pub struct VerifiedClaims { /* private fields */ }Expand description
Verified claims from a PASETO token.
After successful verification, iss and aud are stored as owned fields.
Access them via typed accessors instead of raw JSON lookup.
Implementations§
Source§impl VerifiedClaims
impl VerifiedClaims
Sourcepub fn get_claim(&self, key: &str) -> Option<&JsonValue>
pub fn get_claim(&self, key: &str) -> Option<&JsonValue>
Gets a claim value by key (for dynamic/extra claims).
Sourcepub fn session_version(&self) -> Option<i64>
pub fn session_version(&self) -> Option<i64>
Returns the sv (session_version) claim when present.
Human-entity tokens only; None for AI-agent tokens, delegated /
dependent tokens (Token Exchange), and legacy tokens issued before
the claim existed. Legacy-admit contract: consumers receiving None
MUST treat the token as admissible (skip the sv gate). For
cookie-session middleware this is automatic via
SvAwareSessionResolver;
bearer-token consumers that want sv enforcement implement the
comparison themselves against
SessionVersionCache.
Feature: #005 break-glass.
Sourcepub fn magic_link_id(&self) -> Option<&str>
pub fn magic_link_id(&self) -> Option<&str>
Returns the mlt (magic-link token id) claim when present.
Magic-link-path tokens only. Internal to PAS — no Resource Server
use. Exposed for symmetry with session_version() and for SDK
consumers that want to introspect their access tokens for
audit/debug purposes. Feature: #005 break-glass.
Trait Implementations§
Source§impl Clone for VerifiedClaims
impl Clone for VerifiedClaims
Source§fn clone(&self) -> VerifiedClaims
fn clone(&self) -> VerifiedClaims
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more