Expand description
Issuer-scoped credential and session identity types.
Per the v16 credential/session profile: credential identifiers are scoped
by issuer (iss, jti/cti) and session identifiers are scoped by issuer
(iss, sid/workload_session_id). The credential and session namespaces
are disjoint by construction — they have separate types, separate stores,
and never share a key.
CWT cti is a byte string. It is kept as bytes here and never stringified
into the JWT jti text namespace, which would create an ambiguous collision
domain. The CredentialValue enum preserves the encoding distinction.
Structs§
- Credential
Id - Issuer-scoped credential identifier:
(iss, jti/cti). - Global
Session Registry Already Set - Error returned when the global session registry was already published.
- InMemory
Session Registry - In-memory session registry with TTL cleanup.
- Invalid
Session Record - Error returned when a session registration record is malformed: an empty issuer or session identifier in the key, or an empty subject/tenant in the state (v16 §3.1 malformed-identifier denial, §3.3 record shape).
- Session
Exists - Error returned when a session already exists at the given key.
- Session
Key - Issuer-scoped session key:
(iss, sid/workload_session_id). - Session
Kind Mismatch - Error returned when a session key’s identifier variant disagrees with the session state’s kind (v16 §3.3 coherence requirement).
- Session
Publication Failed - Error returned when the session authority could not durably accept a registration (durable write / transport failure) — the session was NOT registered and callers must surface the failure, never proceed as though it succeeded.
- Session
Revoke Error - The session authority did not durably accept a session revocation.
- Session
State - Session state record per v16 §3.3.
Enums§
- Active
OrRevoked - Active-or-revoked session status.
- Credential
Value - A credential identifier value — the JWT
jti(text) or CWTcti(bytes). - Session
Identifier - A session identifier — disjoint OIDC
sidvs workload session. - Session
Kind - Whether a session is interactive (OIDC user login) or workload.
- Session
Register Error - Error returned by
SessionRegistry::register_session.
Traits§
- Session
Registry - Session registry: tracks active sessions and their revocation state.
Functions§
- global_
session_ registry - Access the process-global session registry, if published.
- set_
global_ session_ registry - Publish the process-global session registry. Called once at startup; a second call returns an error so the caller can detect a publication race.