pub struct AuthServer<ChallengeFn, VerifyFn, InfoFn, ErrorFn> where
    ChallengeFn: Fn(Vec<AuthQuestion>, HashMap<String, String>) -> Vec<String> + Send + Sync,
    VerifyFn: Fn(AuthVerifyKind, String) -> bool + Send + Sync,
    InfoFn: Fn(String) + Send + Sync,
    ErrorFn: Fn(AuthErrorKind, String) + Send + Sync
{ pub on_challenge: ChallengeFn, pub on_verify: VerifyFn, pub on_info: InfoFn, pub on_error: ErrorFn, }
Expand description

Server that handles authentication

Fields

on_challenge: ChallengeFnon_verify: VerifyFnon_info: InfoFnon_error: ErrorFn

Trait Implementations

Type of data received by the server

Type of data sent back by the server

Type of data to store locally tied to the specific connection

Invoked upon receiving a request from a client. The server should process this request, which can be found in ctx, and send one or more replies in response. Read more

Returns configuration tied to server instance

Invoked immediately on server start, being provided the raw listener to use (untyped transport), and returning the listener when ready to start (enabling servers that need to tweak a listener to do so) Invoked upon a new connection becoming established, which provides a mutable reference to the data created for the connection. This can be useful in performing some additional initialization on the data prior to it being used anywhere else. 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.

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

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more