pub struct TokenInfo {
pub header: Value,
pub payload: Value,
pub provider: Option<AuthProvider>,
}Expand description
Token information extracted from JWT without verification
Fields§
§header: Value§payload: Value§provider: Option<AuthProvider>Implementations§
Source§impl TokenInfo
impl TokenInfo
Sourcepub fn expires_at(&self) -> Option<i64>
pub fn expires_at(&self) -> Option<i64>
Get expiration timestamp from token payload
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Check if token has expired (based on exp claim)
Sourcepub fn token_type(&self) -> Option<&str>
pub fn token_type(&self) -> Option<&str>
Get token type from header
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TokenInfo
impl RefUnwindSafe for TokenInfo
impl Send for TokenInfo
impl Sync for TokenInfo
impl Unpin for TokenInfo
impl UnwindSafe for TokenInfo
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)