using CSRedis;
using DFS.Infrastructure.Redis;
using Microsoft.AspNetCore.Authorization;


namespace DFS.Core.Mvc.Authorize
{
    /// <summary>
    /// 权限认证处理
    /// </summary>
    public class DFSAuthorizationHandler : AuthorizationHandler<DfsAuthorizationRequirement>
    {
        public IRedisClient _redisClient;
        public DFSAuthorizationHandler()
        {

        }
        protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, DfsAuthorizationRequirement requirement)
        {
            var redisCon = CoreRedisHelper.GetRedisHelper("auth");
            ////注入具体查询的方法
            //if (useHandle!=null)
            //{
            //    useHandle.Invoke();
            //}
            return Task.CompletedTask;
        }
    }
}
