Enum IdentitySubject
#[non_exhaustive]pub enum IdentitySubject {
SharedOperator,
Oidc {
issuer: String,
subject: String,
},
Service {
issuer: String,
client_id: String,
},
Roster {
principal_id: String,
},
}Expand description
The verified subject of an AuthenticatedIdentity. Each variant carries
exactly the fields its canonical PrincipalId is composed from, so a
provider cannot construct an ambiguous or cross-class identity.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Explicitly-trusted shared operator (native pairing token, or the daemon’s own uid on the local socket). Trusted, but NOT a distinct authenticated identity.
Oidc
An OIDC human identity. issuer is the VALIDATED iss; subject
the validated sub.
Service
An OIDC service principal. client_id is the stable verified client
identity from the validated token/introspection response.
Roster
A local roster identity: the durable [users.<name>] principal id
the credential mapped to through explicit configuration.
Implementations§
Source§impl IdentitySubject
impl IdentitySubject
Sourcepub fn principal_id(&self) -> PrincipalId
pub fn principal_id(&self) -> PrincipalId
The canonical principal id this subject resolves to. One composition rule, owned here — providers and the resolver cannot disagree.
Sourcepub fn actor_kind(&self) -> ActorKind
pub fn actor_kind(&self) -> ActorKind
The actor kind this subject implies.
Sourcepub fn trust_domain(&self) -> &str
pub fn trust_domain(&self) -> &str
The trust domain recorded on the resolved principal: the validated
issuer for OIDC identities, local for roster identities, native
for the shared operator.
Sourcepub fn display_id(&self) -> &str
pub fn display_id(&self) -> &str
A human-readable, non-authoritative display identifier (OIDC sub,
roster principal id, service client_id).
Trait Implementations§
Source§impl Clone for IdentitySubject
impl Clone for IdentitySubject
Source§fn clone(&self) -> IdentitySubject
fn clone(&self) -> IdentitySubject
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more