Skip to main content

ServerAuthentication

Trait ServerAuthentication 

Source
pub trait ServerAuthentication<Peer> {
    type Identity;
    type Error;

    // Required methods
    fn start<'a>(
        &'a mut self,
        request: ServerAuthenticationRequest<'a, Peer>,
    ) -> ServerAuthenticationFuture<'a, ServerAuthenticationAction<Self::Identity>, Self::Error>;
    fn respond<'a>(
        &'a mut self,
        request: ServerAuthenticationRequest<'a, Peer>,
        response: ServerAuthenticationResponse,
    ) -> ServerAuthenticationFuture<'a, ServerAuthenticationAction<Self::Identity>, Self::Error>;
}
Expand description

Per-connection asynchronous authentication policy.

Required Associated Types§

Source

type Identity

Typed evidence produced by successful authentication.

Source

type Error

Application-defined authentication failure.

Required Methods§

Source

fn start<'a>( &'a mut self, request: ServerAuthenticationRequest<'a, Peer>, ) -> ServerAuthenticationFuture<'a, ServerAuthenticationAction<Self::Identity>, Self::Error>

Starts the application-driven authentication conversation.

Source

fn respond<'a>( &'a mut self, request: ServerAuthenticationRequest<'a, Peer>, response: ServerAuthenticationResponse, ) -> ServerAuthenticationFuture<'a, ServerAuthenticationAction<Self::Identity>, Self::Error>

Advances the conversation after one protocol response.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§