CredentialExchanger

Trait CredentialExchanger 

Source
pub trait CredentialExchanger: Send + Sync {
    // Required method
    fn exchange<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        credential: &'life1 AuthCredential,
        scheme: Option<&'life2 AuthScheme>,
    ) -> Pin<Box<dyn Future<Output = Result<AuthCredential, CredentialExchangeError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Trait for exchanging/transforming credentials (e.g. auth code -> access token).

Required Methods§

Source

fn exchange<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, credential: &'life1 AuthCredential, scheme: Option<&'life2 AuthScheme>, ) -> Pin<Box<dyn Future<Output = Result<AuthCredential, CredentialExchangeError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Exchange or transform a credential (e.g., auth code to access token).

Implementors§