Class ClaimScopes
- Namespace
- KernLab.Claim.Protocol
- Assembly
- KernLab.Claim.Protocol.dll
Scope 命名空间(契约 §3):格式 tc.<product>.<resource>.<action>,
全小写,* 通配仅允许出现在 action 段。注册表住在本文件——新增 scope 走契约 PR(四消费方评审)。
public static class ClaimScopes
- Inheritance
-
ClaimScopes
- Inherited Members
Fields
ClaimAdmin
Claim 管理面(客户端 / 密钥 / 撤销管理)。
public const string ClaimAdmin = "kernlab.claim.admin"
Field Value
CohortConfigAdmin
Cohort 配置面管理(发布 / 回滚 / 灰度)。
public const string CohortConfigAdmin = "kernlab.cohort.config.admin"
Field Value
CohortConfigAll
Cohort 配置面通配。
public const string CohortConfigAll = "kernlab.cohort.config.*"
Field Value
CohortConfigRead
Cohort 配置面读。
public const string CohortConfigRead = "kernlab.cohort.config.read"
Field Value
CohortConfigWrite
Cohort 配置面写。
public const string CohortConfigWrite = "kernlab.cohort.config.write"
Field Value
CohortNamingAll
Cohort 注册面通配(含心跳)。
public const string CohortNamingAll = "kernlab.cohort.naming.*"
Field Value
CohortNamingRead
Cohort 注册面读。
public const string CohortNamingRead = "kernlab.cohort.naming.read"
Field Value
CohortNamingWrite
Cohort 注册面写。
public const string CohortNamingWrite = "kernlab.cohort.naming.write"
Field Value
邮箱身份(WP8——userinfo 增 email/email_verified;v0.3 契约注册)。
public const string Email = "email"
Field Value
OfflineAccess
离线访问(刷新令牌授权,OAuth2 标准惯例名)。
public const string OfflineAccess = "offline_access"
Field Value
OpenId
OpenId(OIDC 标准必带 scope)。
public const string OpenId = "openid"
Field Value
Profile
基础身份档案(WP8——userinfo 增 name/preferred_username;v0.3 契约注册)。
public const string Profile = "profile"
Field Value
SynodKvAdmin
Synod KV 面管理(lease / compact / snapshot)。
public const string SynodKvAdmin = "kernlab.synod.kv.admin"
Field Value
SynodKvAll
Synod KV 面通配。
public const string SynodKvAll = "kernlab.synod.kv.*"
Field Value
SynodKvRead
Synod KV 面。
public const string SynodKvRead = "kernlab.synod.kv.read"
Field Value
SynodKvWrite
Synod KV 面写。
public const string SynodKvWrite = "kernlab.synod.kv.write"
Field Value
Properties
Registered
初始注册表全集(discovery scopes_supported 顺序即注册序)。
public static IReadOnlyList<string> Registered { get; }
Property Value
Methods
Covers(IEnumerable<string>, string)
授权判定:granted 是否覆盖 required——
逐条匹配, 通配仅整段通配(kernlab.cohort.naming. 覆盖该 resource 全部 action)。
public static bool Covers(IEnumerable<string> granted, string required)
Parameters
grantedIEnumerable<string>requiredstring
Returns
CoversAll(IEnumerable<string>, IEnumerable<string>)
批量授权判定(全部覆盖才真)。
public static bool CoversAll(IEnumerable<string> granted, IEnumerable<string> required)
Parameters
grantedIEnumerable<string>requiredIEnumerable<string>
Returns
Join(IEnumerable<string>)
scope 集合串接(空格分隔)。
public static string Join(IEnumerable<string> scopes)
Parameters
scopesIEnumerable<string>
Returns
Parse(string?)
scope 串解析(空格分隔 → 去重保序列表;空串 = 空集)。
public static IReadOnlyList<string> Parse(string? scopes)
Parameters
scopesstring