pub struct AccessTokenClaims {
pub sub: UserId,
pub scope: String,
pub iss: String,
pub aud: String,
pub exp: i64,
pub iat: i64,
pub email: String,
pub email_verified: bool,
pub username: Option<String>,
pub roles: Vec<String>,
pub permissions: Vec<String>,
}Expand description
Validated claims extracted from an RS256-signed access token.
The sub value is User.id.to_string() and MUST remain identical
to the sub claim in ID tokens issued by the token endpoint (M41).
OIDC Core Section 5.3.4 requires this consistency.
Fields§
§sub: UserId§scope: String§iss: String§aud: String§exp: i64§iat: i64§email: String§email_verified: bool§username: Option<String>§roles: Vec<String>§permissions: Vec<String>Trait Implementations§
Source§impl Clone for AccessTokenClaims
impl Clone for AccessTokenClaims
Source§fn clone(&self) -> AccessTokenClaims
fn clone(&self) -> AccessTokenClaims
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 moreAuto Trait Implementations§
impl Freeze for AccessTokenClaims
impl RefUnwindSafe for AccessTokenClaims
impl Send for AccessTokenClaims
impl Sync for AccessTokenClaims
impl Unpin for AccessTokenClaims
impl UnsafeUnpin for AccessTokenClaims
impl UnwindSafe for AccessTokenClaims
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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