Table of Contents

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

string

CohortConfigAdmin

Cohort 配置面管理(发布 / 回滚 / 灰度)。

public const string CohortConfigAdmin = "kernlab.cohort.config.admin"

Field Value

string

CohortConfigAll

Cohort 配置面通配。

public const string CohortConfigAll = "kernlab.cohort.config.*"

Field Value

string

CohortConfigRead

Cohort 配置面读。

public const string CohortConfigRead = "kernlab.cohort.config.read"

Field Value

string

CohortConfigWrite

Cohort 配置面写。

public const string CohortConfigWrite = "kernlab.cohort.config.write"

Field Value

string

CohortNamingAll

Cohort 注册面通配(含心跳)。

public const string CohortNamingAll = "kernlab.cohort.naming.*"

Field Value

string

CohortNamingRead

Cohort 注册面读。

public const string CohortNamingRead = "kernlab.cohort.naming.read"

Field Value

string

CohortNamingWrite

Cohort 注册面写。

public const string CohortNamingWrite = "kernlab.cohort.naming.write"

Field Value

string

Email

邮箱身份(WP8——userinfo 增 email/email_verified;v0.3 契约注册)。

public const string Email = "email"

Field Value

string

OfflineAccess

离线访问(刷新令牌授权,OAuth2 标准惯例名)。

public const string OfflineAccess = "offline_access"

Field Value

string

OpenId

OpenId(OIDC 标准必带 scope)。

public const string OpenId = "openid"

Field Value

string

Profile

基础身份档案(WP8——userinfo 增 name/preferred_username;v0.3 契约注册)。

public const string Profile = "profile"

Field Value

string

SynodKvAdmin

Synod KV 面管理(lease / compact / snapshot)。

public const string SynodKvAdmin = "kernlab.synod.kv.admin"

Field Value

string

SynodKvAll

Synod KV 面通配。

public const string SynodKvAll = "kernlab.synod.kv.*"

Field Value

string

SynodKvRead

Synod KV 面。

public const string SynodKvRead = "kernlab.synod.kv.read"

Field Value

string

SynodKvWrite

Synod KV 面写。

public const string SynodKvWrite = "kernlab.synod.kv.write"

Field Value

string

Properties

Registered

初始注册表全集(discovery scopes_supported 顺序即注册序)。

public static IReadOnlyList<string> Registered { get; }

Property Value

IReadOnlyList<string>

Methods

Covers(IEnumerable<string>, string)

授权判定:granted 是否覆盖 required—— 逐条匹配, 通配仅整段通配(kernlab.cohort.naming. 覆盖该 resource 全部 action)。

public static bool Covers(IEnumerable<string> granted, string required)

Parameters

granted IEnumerable<string>
required string

Returns

bool

CoversAll(IEnumerable<string>, IEnumerable<string>)

批量授权判定(全部覆盖才真)。

public static bool CoversAll(IEnumerable<string> granted, IEnumerable<string> required)

Parameters

granted IEnumerable<string>
required IEnumerable<string>

Returns

bool

Join(IEnumerable<string>)

scope 集合串接(空格分隔)。

public static string Join(IEnumerable<string> scopes)

Parameters

scopes IEnumerable<string>

Returns

string

Parse(string?)

scope 串解析(空格分隔 → 去重保序列表;空串 = 空集)。

public static IReadOnlyList<string> Parse(string? scopes)

Parameters

scopes string

Returns

IReadOnlyList<string>