pub struct Auth<T> {
pub claims: T,
}Expand description
A request extractor that validates the Authorization: Bearer <token> header
and resolves to the decoded claims T.
T must implement both Deserialize and HasJti. Types that do not use
revocation can satisfy HasJti with a one-line empty impl.
§Responses on failure
401– missing header, invalid/expired/revoked token.500– the globalJwtManagerwas not initialised.
Fields§
§claims: TTrait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Auth<T>where
T: Freeze,
impl<T> RefUnwindSafe for Auth<T>where
T: RefUnwindSafe,
impl<T> Send for Auth<T>where
T: Send,
impl<T> Sync for Auth<T>where
T: Sync,
impl<T> Unpin for Auth<T>where
T: Unpin,
impl<T> UnsafeUnpin for Auth<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Auth<T>where
T: 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