mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-20 08:26:37 +08:00
17 lines
480 B
C#
17 lines
480 B
C#
|
|
using Furion.Authorization;
|
|||
|
|
using Microsoft.AspNetCore.Authorization;
|
|||
|
|
using Microsoft.AspNetCore.Http;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
|
|||
|
|
namespace Yi.Furion.Rbac.Web.Core;
|
|||
|
|
|
|||
|
|
public class JwtHandler : AppAuthorizeHandler
|
|||
|
|
{
|
|||
|
|
public override Task<bool> PipelineAsync(AuthorizationHandlerContext context, DefaultHttpContext httpContext)
|
|||
|
|
{
|
|||
|
|
// 这里写您的授权判断逻辑,授权通过返回 true,否则返回 false
|
|||
|
|
|
|||
|
|
return Task.FromResult(true);
|
|||
|
|
}
|
|||
|
|
}
|