Struct wascap::jwt::TokenValidation
source · pub struct TokenValidation {
pub expired: bool,
pub cannot_use_yet: bool,
pub expires_human: String,
pub not_before_human: String,
pub signature_valid: bool,
}
Expand description
The result of the validation process perform on a JWT
Fields§
§expired: bool
Indicates whether or not this token has expired, as determined by the current OS system clock.
If true
, you should treat the associated token as invalid
cannot_use_yet: bool
Indicates whether this token is not yet valid. If true
, do not use this token
expires_human: String
A human-friendly (lowercase) description of the relative expiration date (e.g. “in 3 hours”). If the token never expires, the value will be “never”
not_before_human: String
A human-friendly description of the relative time when this token will become valid (e.g. “in 2 weeks”). If the token has not had a “not before” date set, the value will be “immediately”
signature_valid: bool
Indicates whether the signature is valid according to a cryptographic comparison. If false
you should
reject this token.
Trait Implementations§
source§impl Clone for TokenValidation
impl Clone for TokenValidation
source§fn clone(&self) -> TokenValidation
fn clone(&self) -> TokenValidation
Returns a copy of the value. Read more
1.0.0 · 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 TokenValidation
impl Debug for TokenValidation
source§impl<'de> Deserialize<'de> for TokenValidation
impl<'de> Deserialize<'de> for TokenValidation
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 PartialEq for TokenValidation
impl PartialEq for TokenValidation
source§impl Serialize for TokenValidation
impl Serialize for TokenValidation
impl StructuralPartialEq for TokenValidation
Auto Trait Implementations§
impl Freeze for TokenValidation
impl RefUnwindSafe for TokenValidation
impl Send for TokenValidation
impl Sync for TokenValidation
impl Unpin for TokenValidation
impl UnwindSafe for TokenValidation
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)