pub struct JwtClaims<CustomClaims> {
pub registered_claims: RegisteredClaims,
pub custom_claims: CustomClaims,
}Expand description
Combined registered and application-specific JWT claims.
This is the main typed claim container used with JsonWebToken<T>.
Fields§
§registered_claims: RegisteredClaimsStandard JWT registered claims.
custom_claims: CustomClaimsApplication-specific claims.
Implementations§
Source§impl<CustomClaims> JwtClaims<CustomClaims>
impl<CustomClaims> JwtClaims<CustomClaims>
Sourcepub fn new(
custom_claims: CustomClaims,
registered_claims: RegisteredClaims,
) -> Self
pub fn new( custom_claims: CustomClaims, registered_claims: RegisteredClaims, ) -> Self
Creates a new combined claims value.
Sourcepub fn has_issuer(&self, issuer: &str) -> bool
pub fn has_issuer(&self, issuer: &str) -> bool
Returns true when the issuer matches issuer.
Trait Implementations§
Source§impl<'de, CustomClaims> Deserialize<'de> for JwtClaims<CustomClaims>where
CustomClaims: Deserialize<'de>,
impl<'de, CustomClaims> Deserialize<'de> for JwtClaims<CustomClaims>where
CustomClaims: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<C, R, G> JwtClaimsVerifier<JwtClaims<Account<R, G>>> for JwtValidationService<C>
impl<C, R, G> JwtClaimsVerifier<JwtClaims<Account<R, G>>> for JwtValidationService<C>
Source§impl<CustomClaims: PartialEq> PartialEq for JwtClaims<CustomClaims>
impl<CustomClaims: PartialEq> PartialEq for JwtClaims<CustomClaims>
impl<CustomClaims: Eq> Eq for JwtClaims<CustomClaims>
impl<CustomClaims> StructuralPartialEq for JwtClaims<CustomClaims>
Auto Trait Implementations§
impl<CustomClaims> Freeze for JwtClaims<CustomClaims>where
CustomClaims: Freeze,
impl<CustomClaims> RefUnwindSafe for JwtClaims<CustomClaims>where
CustomClaims: RefUnwindSafe,
impl<CustomClaims> Send for JwtClaims<CustomClaims>where
CustomClaims: Send,
impl<CustomClaims> Sync for JwtClaims<CustomClaims>where
CustomClaims: Sync,
impl<CustomClaims> Unpin for JwtClaims<CustomClaims>where
CustomClaims: Unpin,
impl<CustomClaims> UnsafeUnpin for JwtClaims<CustomClaims>where
CustomClaims: UnsafeUnpin,
impl<CustomClaims> UnwindSafe for JwtClaims<CustomClaims>where
CustomClaims: UnwindSafe,
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