pub enum JwtAuthState {
Authorized,
Unauthorized,
Forbidden,
}Expand description
Possible states of JWT authentication.
The middleware sets this state in the depot after processing a request.
You can access it via depot.jwt_auth_state().
Variants§
Authorized
Authentication was successful and the token was valid.
No token was provided in the request.
Usually results in a 401 Unauthorized response unless force_passed is true.
Forbidden
A token was provided but it failed validation.
Usually results in a 403 Forbidden response unless force_passed is true.
Trait Implementations§
Source§impl Clone for JwtAuthState
impl Clone for JwtAuthState
Source§fn clone(&self) -> JwtAuthState
fn clone(&self) -> JwtAuthState
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 JwtAuthState
impl Debug for JwtAuthState
Source§impl PartialEq for JwtAuthState
impl PartialEq for JwtAuthState
impl Copy for JwtAuthState
impl Eq for JwtAuthState
impl StructuralPartialEq for JwtAuthState
Auto Trait Implementations§
impl Freeze for JwtAuthState
impl RefUnwindSafe for JwtAuthState
impl Send for JwtAuthState
impl Sync for JwtAuthState
impl Unpin for JwtAuthState
impl UnwindSafe for JwtAuthState
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.