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§
Required Methods§
Sourceasync fn start(
&mut self,
request: ServerAuthenticationRequest<'_, Peer>,
) -> Result<ServerAuthenticationAction<Self::Identity>, Self::Error>
async fn start( &mut self, request: ServerAuthenticationRequest<'_, Peer>, ) -> Result<ServerAuthenticationAction<Self::Identity>, Self::Error>
Starts the application-driven authentication conversation.
Sourceasync fn respond(
&mut self,
request: ServerAuthenticationRequest<'_, Peer>,
response: ServerAuthenticationResponse,
) -> Result<ServerAuthenticationAction<Self::Identity>, Self::Error>
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".