pub trait Authenticator {
    // Required method
    fn mechanism(&self) -> &str;

    // Provided methods
    fn auth(&self) -> Option<String> { ... }
    fn handle<'a, 'life0, 'async_trait, S>(
        &'life0 self,
        _communicator: Communicator<'a, S>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where S: 'async_trait + Read + Write + Unpin + Send,
             Self: Sync + 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

source

fn mechanism(&self) -> &str

The name of the mechanism, e.g: “XOAUTH2” or “KERBEROS_4”.

Provided Methods§

source

fn auth(&self) -> Option<String>

If provided, the return string will be added as an argument to the initial “AUTH” command.

Will automatically be base64 encoded.

source

fn handle<'a, 'life0, 'async_trait, S>( &'life0 self, _communicator: Communicator<'a, S> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where S: 'async_trait + Read + Write + Unpin + Send, Self: Sync + 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Handle a handshake conversation between the server and the client.

The Communicator allows you to send and receive data needed for authentication

Object Safety§

This trait is not object safe.

Implementors§