using HuiXin.Gateway.Ocelot.Configurations; using Microsoft.Extensions.Options; using Ocelot.Infrastructure.Claims.Parser; using Ocelot.Responses; namespace HuiXin.Gateway.Ocelot.Authorizers { public class RolesAuthorizerBase { protected readonly IClaimsParser _claimsParser; protected RolesAuthorizerConfiguration _configs; public RolesAuthorizerBase(IClaimsParser claimsParser, IOptions cfg) { _claimsParser = claimsParser; _configs = cfg.Value ?? throw new Exception("未配置角色验证参数"); } protected async Task> ReturnAsync(Response response) { return await Task.FromResult(response); } } }