#[non_exhaustive]pub struct JwtClaims { /* private fields */ }Implementations§
Source§impl JwtClaims
impl JwtClaims
Sourcepub fn audience(&self) -> &[String]
pub fn audience(&self) -> &[String]
Returns the audience for these credentials, from the aud claim.
Sourcepub fn identity(&self) -> Identity
pub fn identity(&self) -> Identity
Returns the identity for these credentials, which is based on the iss and sub claims.
Sourcepub fn raw_payload(&self) -> &str
pub fn raw_payload(&self) -> &str
Get the whole JWT payload as a json string.
This method is intended for parsing custom claims,
beyond the methods offered by JwtClaims.
Auto Trait Implementations§
impl !Freeze for JwtClaims
impl !RefUnwindSafe for JwtClaims
impl !Sync for JwtClaims
impl Send for JwtClaims
impl Unpin for JwtClaims
impl UnsafeUnpin for JwtClaims
impl UnwindSafe for JwtClaims
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> 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