pub struct SessionClaims {
pub issuer: String,
pub key_id: String,
pub subject: SessionSubject,
pub scopes: Vec<SessionScope>,
pub issued_ms: u64,
pub expires_ms: u64,
}Expand description
A verified session’s claims: who it’s bound to, what it authorizes, and its issue/expiry window.
Fields§
§issuer: StringStable signing-role issuer.
key_id: StringExact key identity selected from the session trust set.
subject: SessionSubjectWhich credential rooted this session, and what it resolves to.
scopes: Vec<SessionScope>The capabilities this token carries. Never empty — mint_session
requires at least one scope, since a session that authorizes nothing
has no reason to exist.
issued_ms: u64When this session was minted (unix ms).
expires_ms: u64When this session stops verifying (unix ms).
Implementations§
Source§impl SessionClaims
impl SessionClaims
Sourcepub fn has_scope(&self, scope: SessionScope) -> bool
pub fn has_scope(&self, scope: SessionScope) -> bool
Whether this session carries scope.
Trait Implementations§
Source§impl Clone for SessionClaims
impl Clone for SessionClaims
Source§fn clone(&self) -> SessionClaims
fn clone(&self) -> SessionClaims
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SessionClaims
impl Debug for SessionClaims
impl Eq for SessionClaims
Source§impl PartialEq for SessionClaims
impl PartialEq for SessionClaims
impl StructuralPartialEq for SessionClaims
Auto Trait Implementations§
impl Freeze for SessionClaims
impl RefUnwindSafe for SessionClaims
impl Send for SessionClaims
impl Sync for SessionClaims
impl Unpin for SessionClaims
impl UnsafeUnpin for SessionClaims
impl UnwindSafe for SessionClaims
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more