Skip to main content

AuthenticationChannel

Trait AuthenticationChannel 

Source
pub trait AuthenticationChannel: Send + Sync {
    // Required methods
    fn send_challenge<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        peer_id: &'life1 NodeId,
        challenge: &'life2 Challenge,
    ) -> Pin<Box<dyn Future<Output = Result<(), SecurityError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn receive_response<'life0, 'life1, 'async_trait>(
        &'life0 self,
        peer_id: &'life1 NodeId,
    ) -> Pin<Box<dyn Future<Output = Result<SignedChallengeResponse, SecurityError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn send_response<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        peer_id: &'life1 NodeId,
        response: &'life2 SignedChallengeResponse,
    ) -> Pin<Box<dyn Future<Output = Result<(), SecurityError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn receive_challenge<'life0, 'life1, 'async_trait>(
        &'life0 self,
        peer_id: &'life1 NodeId,
    ) -> Pin<Box<dyn Future<Output = Result<Challenge, SecurityError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Authentication callback for custom transport-level auth message exchange.

This trait allows the secure transport to exchange authentication messages over any underlying transport mechanism.

Required Methods§

Source

fn send_challenge<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, peer_id: &'life1 NodeId, challenge: &'life2 Challenge, ) -> Pin<Box<dyn Future<Output = Result<(), SecurityError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Send an authentication challenge to a peer.

Source

fn receive_response<'life0, 'life1, 'async_trait>( &'life0 self, peer_id: &'life1 NodeId, ) -> Pin<Box<dyn Future<Output = Result<SignedChallengeResponse, SecurityError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Receive a challenge response from a peer.

Source

fn send_response<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, peer_id: &'life1 NodeId, response: &'life2 SignedChallengeResponse, ) -> Pin<Box<dyn Future<Output = Result<(), SecurityError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Send a challenge response to a peer.

Source

fn receive_challenge<'life0, 'life1, 'async_trait>( &'life0 self, peer_id: &'life1 NodeId, ) -> Pin<Box<dyn Future<Output = Result<Challenge, SecurityError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Receive a challenge from a peer.

Implementors§