Crping.AuthPolicy.JWT.DI
0.8.0
dotnet add package Crping.AuthPolicy.JWT.DI --version 0.8.0
NuGet\Install-Package Crping.AuthPolicy.JWT.DI -Version 0.8.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Crping.AuthPolicy.JWT.DI" Version="0.8.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Crping.AuthPolicy.JWT.DI" Version="0.8.0" />
<PackageReference Include="Crping.AuthPolicy.JWT.DI" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Crping.AuthPolicy.JWT.DI --version 0.8.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Crping.AuthPolicy.JWT.DI, 0.8.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Crping.AuthPolicy.JWT.DI@0.8.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Crping.AuthPolicy.JWT.DI&version=0.8.0
#tool nuget:?package=Crping.AuthPolicy.JWT.DI&version=0.8.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Crping.AuthPolicy.JWT.DI
将Crping.AuthPolicy.JWT相关服务注入WebApi等项目
版本更新说明
0.8.0
2026年8月15日 星期六
- [修复] AdminAuthHandler / MemberAuthHandler 判定 UserType 误用 AuthPolicies 策略名常量 → 改用 UserTypes 用户类型常量(当前字符串值相同,行为不变,消除语义隐患)
- [文档] ConfigureJwtBearer 补充 Configure<AuthOptions>(IOptions,供 DAL AuthDbContext 消费)与 AuthConfig(启动期校验权威来源)双注册的有意设计说明
0.7.0
2026年8月15日 星期六
- [修改] JwtBearer 设置 MapInboundClaims=false,保持自定义 Claim 名(Role/UserId/UserType)
- [修改] 授权策略改为 AddAuthorization(),由自定义 AuthPolicyProvider 解析(Admin/Member/Default)
- [新增] JwtBearer Events.OnAuthenticationFailed 认证失败日志,便于排查 401
0.4.0
2026年1月8日 星期四
- 升级为
.net10 - 新增
AdminAuthHandler - 新增
MemberAuthHandler
0.3.0
2024年11月19日 星期二
0.3.0
2024年11月19日 星期二
- 升级为
.net9
0.1.0
2024年4月5日 星期五
- 授权策略验证依赖注入
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Crping.AuthPolicy.JWT (>= 0.8.0)
- Crping.AuthPolicy.JWT.Common (>= 0.8.0)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 10.0.12)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.