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

Authorised

The user is authorized, authentication data is attached.

Tuple Fields of Authorised

0: AuthToken
InvalidToken

An invalid token was provided.

NoToken

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 valid.

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.