From 2d04b2f19d201ff10ed76c1773235488e9ab7628 Mon Sep 17 00:00:00 2001 From: liaoxujun@qq.com <liaoxujun@qq.com> Date: 星期三, 20 九月 2023 09:50:48 +0800 Subject: [PATCH] 修改权限开通逻辑 --- DocumentServiceAPI.Web.Core/Handlers/JwtHandler.cs | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DocumentServiceAPI.Web.Core/Handlers/JwtHandler.cs b/DocumentServiceAPI.Web.Core/Handlers/JwtHandler.cs index 67313c5..a82f02d 100644 --- a/DocumentServiceAPI.Web.Core/Handlers/JwtHandler.cs +++ b/DocumentServiceAPI.Web.Core/Handlers/JwtHandler.cs @@ -1,4 +1,6 @@ -锘縰sing Furion.Authorization; +锘縰sing DocumentServiceAPI.Application.UserAndLogin.Services; +using Furion; +using Furion.Authorization; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using System.Threading.Tasks; @@ -10,7 +12,8 @@ public override Task<bool> PipelineAsync(AuthorizationHandlerContext context, DefaultHttpContext httpContext) { // 杩欓噷鍐欐偍鐨勬巿鏉冨垽鏂�昏緫锛屾巿鏉冮�氳繃杩斿洖 true锛屽惁鍒欒繑鍥� false + bool ret= App.GetService<TokenService>().CheckToken(); - return Task.FromResult(true); + return Task.FromResult(ret); } } -- Gitblit v1.9.1