摘要:
Program.cs #region 授权 builder.Services.AddAuthorization(option => { //添加自定义授权策略 option.AddPolicy("MyPolicy",p => p.RequireClaim(ClaimTypes.NameIdentif 阅读全文
posted @ 2024-01-02 18:49
leafroc
阅读(2515)
评论(0)
推荐(1)
摘要:
TokenAuthenticationHandler.cs 首先自定义一个类TokenAuthenticationHandler,然后需要继承IAuthenticationHandler接口 具体代码: public class TokenAuthenticationHandler : IAuthe 阅读全文
posted @ 2024-01-02 15:53
leafroc
阅读(534)
评论(0)
推荐(0)

浙公网安备 33010602011771号