pub struct AuthHandlerMap { /* private fields */ }
Expand description

Implementation of AuthHandler that maintains a map of AuthMethodHandler implementations for specific methods, invoking on_challenge, on_verification, on_info, and on_error for a specific handler based on an associated id.

Implementations

Creates a new, empty map of auth method handlers.

Returns the id of the active AuthMethodHandler.

Sets the active AuthMethodHandler by its id.

Inserts the specified handler into the map, associating it with id for determining the method that would trigger this handler.

Removes a handler with the associated id.

Retrieves a mutable reference to the active AuthMethodHandler with the specified id, returning an error if no handler for the active id is found.

Retrieves a mutable reference to the active AuthMethodHandler with the specified id.

Retrieves a mutable reference to the AuthMethodHandler with the specified id.

Consumes the map, returning a new map that supports the static_key method.

Trait Implementations

Callback when authentication is beginning, providing available authentication methods and returning selected authentication methods to pursue. Read more
Callback when authentication starts for a specific method.
Callback when authentication is finished and no more requests will be received.
Callback when a challenge is received, returning answers to the given questions.
Callback when a verification request is received, returning true if approvided or false if unapproved. Read more
Callback when information is received. To fail, return an error from this function.
Callback when an error is received. Regardless of the result returned, this will terminate the authenticator. In the situation where a custom error would be preferred, have this callback return an error. Read more
Returns the “default value” for a type. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
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.