Skip to main content

ExternalAuthProviderDriver

Trait ExternalAuthProviderDriver 

Source
pub trait ExternalAuthProviderDriver: Send + Sync {
    // Required methods
    fn kind(&self) -> ExternalAuthProviderKind;
    fn descriptor(&self) -> ExternalAuthProviderDescriptor;
    fn start_authorization<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        provider: &'life1 ExternalAuthProviderConfig,
        redirect_uri: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<ExternalAuthAuthorizationStart>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn exchange_callback<'life0, 'life1, 'async_trait>(
        &'life0 self,
        provider: &'life1 ExternalAuthProviderConfig,
        callback: ExternalAuthCallback,
    ) -> Pin<Box<dyn Future<Output = Result<ExternalAuthProfile>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn test_provider<'life0, 'life1, 'async_trait>(
        &'life0 self,
        provider: &'life1 ExternalAuthProviderConfig,
    ) -> Pin<Box<dyn Future<Output = Result<ExternalAuthProviderTestResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

External authentication provider driver.

Required Methods§

Source

fn kind(&self) -> ExternalAuthProviderKind

Returns the provider kind handled by this driver.

Source

fn descriptor(&self) -> ExternalAuthProviderDescriptor

Returns static provider metadata and capability flags.

Source

fn start_authorization<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, provider: &'life1 ExternalAuthProviderConfig, redirect_uri: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<ExternalAuthAuthorizationStart>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Builds an authorization URL and state values for a browser redirect.

Source

fn exchange_callback<'life0, 'life1, 'async_trait>( &'life0 self, provider: &'life1 ExternalAuthProviderConfig, callback: ExternalAuthCallback, ) -> Pin<Box<dyn Future<Output = Result<ExternalAuthProfile>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Exchanges a callback authorization code and returns a normalized profile.

Source

fn test_provider<'life0, 'life1, 'async_trait>( &'life0 self, provider: &'life1 ExternalAuthProviderConfig, ) -> Pin<Box<dyn Future<Output = Result<ExternalAuthProviderTestResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Performs configuration/discovery checks suitable for admin validation.

Implementors§