Enum diana::AuthState [−][src]
pub enum AuthState { Authorised(AuthToken), InvalidToken, NoToken, }
Expand description
The three states authentication can be in at the token level.
Variants
The user is authorized, authentication data is attached.
Tuple Fields of Authorised
0: AuthToken
An invalid token was provided.
No token was provided.
Implementations
Checks if the each key/value pair in the given HashMap
is present in the token. This will return false if the token was invalid
or not provided.
Checks if the token is invalid.
Checks if the token is not present.
Gets a reference to the claims of the token (including metadata like expiry).
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for AuthState
impl UnwindSafe for AuthState
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more