pub struct VerifiedUser { /* private fields */ }Expand description
Sealed proof that an IdP-signed token was verified.
Carries the verified claims that the framework extracted from the signed
token (user_id, issuer, issued_at, expires_at, and — per UT-1 —
the optional tenant sourced from the org_id claim). The presence of
a VerifiedUser value is itself the proof — there is no way to
construct one from outside plexus-auth-core.
§Sealing
The constructor is pub(crate). Only the verifier inside this crate
(which validates the IdP signature) is able to mint a VerifiedUser.
tests/compile_fail/seal_verified_user_construct.rs asserts that no
external crate can construct one.
Implementations§
Source§impl VerifiedUser
impl VerifiedUser
Sourcepub fn expires_at(&self) -> i64
pub fn expires_at(&self) -> i64
Token expiry unix timestamp.
Sourcepub fn tenant_id(&self) -> Option<&TenantId>
pub fn tenant_id(&self) -> Option<&TenantId>
The verified tenant identity (the token’s org_id claim), if any.
None means the token was valid but carried no org_id — a
tenantless user (UT-S01 D3). Tenancy authorization still routes
through the sealed Tenant via a
TenantResolver; this accessor exposes the
verified claim itself.
Trait Implementations§
Source§impl Clone for VerifiedUser
impl Clone for VerifiedUser
Source§fn clone(&self) -> VerifiedUser
fn clone(&self) -> VerifiedUser
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more