pub struct VerifiedClaims { /* private fields */ }Expand description
Verified bearer-token outcome, opaque to the underlying token format.
Internal storage is the engine’s typed Claims payload, but no
consumer ever touches it — accessors return SDK-shaped types
(Ppnum, PpnumId, SessionId, OffsetDateTime) that are stable
across format migrations (PASETO → JWT just happened; future
formats re-implement super::BearerVerifier and ship a new
VerifiedClaims constructor).
No into_inner escape hatch by design (Phase 6.1 audit Finding 4):
every claim consumer code might need is exposed as a typed accessor.
If a future field is needed, add an accessor here before the consumer
ships — never widen to raw claims.
Implementations§
Source§impl VerifiedClaims
impl VerifiedClaims
Sourcepub fn ppnum(&self) -> Option<&Ppnum>
pub fn ppnum(&self) -> Option<&Ppnum>
Digit-form ppnum carried in the active_ppnum claim. None
for AI-agent / machine tokens that have no human ppnum, and
for any token where the issuer omitted the claim. Consumer
code defaults to display-only use; trust decisions key off
ppnum_id (immutable ULID).
Sourcepub fn session_id(&self) -> Option<&SessionId>
pub fn session_id(&self) -> Option<&SessionId>
Session row identifier (sid claim) when the issuer bound the
token to a stored session. None for non-session-bound tokens
(machine credentials, AI-agent flows, R6 legacy admit). When
present, consumer middleware uses it for per-row liveness
checks via SessionStore::find.
Sourcepub fn expires_at(&self) -> OffsetDateTime
pub fn expires_at(&self) -> OffsetDateTime
Expiry (exp claim) as a wall-clock instant. Caller code can
compare against OffsetDateTime::now_utc() for soft-refresh
logic; the engine has already enforced expiry in
super::BearerVerifier::verify so this value is informational
by the time it reaches consumer code.
Trait Implementations§
Source§impl Clone for VerifiedClaims
impl Clone for VerifiedClaims
Source§fn clone(&self) -> VerifiedClaims
fn clone(&self) -> VerifiedClaims
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more