KernLab.Claim.Protocol
1.0.0-alpha.3
dotnet add package KernLab.Claim.Protocol --version 1.0.0-alpha.3
NuGet\Install-Package KernLab.Claim.Protocol -Version 1.0.0-alpha.3
<PackageReference Include="KernLab.Claim.Protocol" Version="1.0.0-alpha.3" />
<PackageVersion Include="KernLab.Claim.Protocol" Version="1.0.0-alpha.3" />
<PackageReference Include="KernLab.Claim.Protocol" />
paket add KernLab.Claim.Protocol --version 1.0.0-alpha.3
#r "nuget: KernLab.Claim.Protocol, 1.0.0-alpha.3"
#:package KernLab.Claim.Protocol@1.0.0-alpha.3
#addin nuget:?package=KernLab.Claim.Protocol&version=1.0.0-alpha.3&prerelease
#tool nuget:?package=KernLab.Claim.Protocol&version=1.0.0-alpha.3&prerelease
KernLab.Claim.Protocol
身份契约包——签发方与全部消费方共同编译的契约面:claims 常量、scope 注册表、token 类型、 协议错误码。零依赖(仅 BCL);改契约 = 改本包 = 消费方同步升版。
包面
| 类型 | 职责 |
|---|---|
ClaimClaims |
claims 常量(iss/sub/aud/exp/iat/jti/typ/scp/ten/env/rol/nonce/sid...) |
ClaimScopes |
scope 注册表(tc.* 命名空间——语义注册表,契约裁定不可配)+ Parse/Covers 覆盖判定 |
TokenTypes |
token 类型常量(service / node / user——签发 typ) |
ClaimProtocolErrors |
协议错误码(OAuth/OIDC 标准码 + tc.* 前缀错误码) |
安装
dotnet add package KernLab.Claim.Protocol
版本纪律:消费方钉精确版本(契约面不做浮动升级)。
最小用法
// scope 覆盖判定(签发面与网关鉴权面同源语义)
var granted = ClaimScopes.Parse("kernlab.cohort.config.read openid");
ClaimScopes.Covers(granted, ClaimScopes.CohortConfigRead); // true
// claims 键一律走常量——禁止字符串字面量散落
claims[ClaimClaims.Ten] = tenant;
契约锚点
本包即契约的编译期形态:claims 最小集 / scope 命名空间 / 双 key 宽限轮换 / principal 映射—— 常量与判定语义以本包为准。契约变更走本包升版评审——消费方不解释 rol(Claim 管理面专用)。
License
MIT © KernLab.Claim Contributors
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on KernLab.Claim.Protocol:
| Package | Downloads |
|---|---|
|
KernLab.Claim.Client
KernLab.Claim 客户端库 — 消费方接入 SDK:token 获取 / 验证(JWKS 本地验签)/ claims 消费 / 授权判定。 |
|
|
KernLab.Claim
KernLab.Claim — 统一认证中心核心库:JOSE/JWT(ES256)签名与验证 / 密钥环与轮换 / 客户端与用户存储抽象 / 授权流(授权码+PKCE / 客户端凭证 / 刷新)。零第三方依赖,AOT 安全。 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-alpha.3 | 109 | 10/5/2026 |
| 1.0.0-alpha.2 | 89 | 9/29/2026 |
| 1.0.0-alpha.1 | 86 | 9/26/2026 |
发行说明见仓库 CHANGELOG:https://github.com/kernlab-dev/kernlab-claim/blob/main/CHANGELOG.md