NuGet 包
NetProOA.Framework.IdentityServer4.AccessTokenValidation
IdentityServer4 访问令牌验证组件,基于 OAuth2 Introspection 标准实现。
🔐
AccessTokenValidation
提供对 IdentityServer4 颁发的访问令牌进行验证的能力,支持 JWT 和 OAuth2 Introspection 协议。
📦 版本信息
版本:4.4.7.7
📋 依赖包
- IdentityModel.AspNetCore.OAuth2Introspection (6.2.0)
- Microsoft.AspNetCore.Authentication.JwtBearer (7.0.14)
🚀 使用方法
安装命令:
dotnet add package NetProOA.Framework.IdentityServer4.AccessTokenValidation
在 Program.cs 中配置:
builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddIdentityServerAuthentication(options =>
{
options.Authority = "https://your-identityserver.com";
options.ApiName = "your-api-name";
});