pub struct JwtClaims { /* private fields */ }Expand description
Standard and extensible JSON Web Token claims payload.
Implementations§
Source§impl JwtClaims
Inherent implementation of JwtClaims.
impl JwtClaims
Inherent implementation of JwtClaims.
Sourcepub fn with_roles<I, S>(self, roles: I) -> Self
pub fn with_roles<I, S>(self, roles: I) -> Self
Sourcepub fn with_issuer<S>(self, issuer: S) -> Self
pub fn with_issuer<S>(self, issuer: S) -> Self
Source§impl JwtClaims
impl JwtClaims
pub fn get_sub(&self) -> &String
pub fn get_mut_sub(&mut self) -> &mut String
pub fn set_sub(&mut self, val: String) -> &mut Self
pub fn get_iss(&self) -> Option<String>
pub fn try_get_iss(&self) -> Option<String>
pub fn get_mut_iss(&mut self) -> &mut Option<String>
pub fn set_iss(&mut self, val: Option<String>) -> &mut Self
pub fn get_aud(&self) -> Option<String>
pub fn try_get_aud(&self) -> Option<String>
pub fn get_mut_aud(&mut self) -> &mut Option<String>
pub fn set_aud(&mut self, val: Option<String>) -> &mut Self
pub fn get_exp(&self) -> Option<u64>
pub fn try_get_exp(&self) -> Option<u64>
pub fn get_mut_exp(&mut self) -> &mut Option<u64>
pub fn set_exp(&mut self, val: Option<u64>) -> &mut Self
pub fn get_nbf(&self) -> Option<u64>
pub fn try_get_nbf(&self) -> Option<u64>
pub fn get_mut_nbf(&mut self) -> &mut Option<u64>
pub fn set_nbf(&mut self, val: Option<u64>) -> &mut Self
pub fn get_iat(&self) -> Option<u64>
pub fn try_get_iat(&self) -> Option<u64>
pub fn get_mut_iat(&mut self) -> &mut Option<u64>
pub fn set_iat(&mut self, val: Option<u64>) -> &mut Self
pub fn get_jti(&self) -> Option<String>
pub fn try_get_jti(&self) -> Option<String>
pub fn get_mut_jti(&mut self) -> &mut Option<String>
pub fn set_jti(&mut self, val: Option<String>) -> &mut Self
pub fn get_roles(&self) -> &Vec<String>
pub fn get_mut_roles(&mut self) -> &mut Vec<String>
pub fn set_roles(&mut self, val: Vec<String>) -> &mut Self
pub fn get_extra(&self) -> &HashMap<String, Value>
pub fn get_mut_extra(&mut self) -> &mut HashMap<String, Value>
pub fn set_extra(&mut self, val: HashMap<String, Value>) -> &mut Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for JwtClaims
Single-pass Serde deserialization for JwtClaims without #[serde(flatten)] buffering.
impl<'de> Deserialize<'de> for JwtClaims
Single-pass Serde deserialization for JwtClaims without #[serde(flatten)] buffering.
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>,
Source§impl Serialize for JwtClaims
Single-pass Serde serialization for JwtClaims without #[serde(flatten)] overhead.
impl Serialize for JwtClaims
Single-pass Serde serialization for JwtClaims without #[serde(flatten)] overhead.
impl StructuralPartialEq for JwtClaims
Auto Trait Implementations§
impl Forget for JwtClaims
impl Freeze for JwtClaimswhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<(String, Value)>: Freeze,
impl Move for JwtClaims
impl RefUnwindSafe for JwtClaims
impl Send for JwtClaims
impl Sync for JwtClaims
impl Unpin for JwtClaims
impl UnsafeUnpin for JwtClaimswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<(String, Value)>: UnsafeUnpin,
impl UnwindSafe for JwtClaims
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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