Skip to main content

ServerAuthentication

Trait ServerAuthentication 

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

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

Per-connection asynchronous authentication policy.

Authentication futures are not required to be Send.

Required Associated Types§

Source

type Identity

Typed evidence produced by successful authentication.

Source

type Error

Application-defined authentication failure.

Required Methods§

Source

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

Starts the application-driven authentication conversation.

Source

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

Advances the conversation after one protocol response.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§