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§
Sourcefn kind(&self) -> ExternalAuthProviderKind
fn kind(&self) -> ExternalAuthProviderKind
Returns the provider kind handled by this driver.
Sourcefn descriptor(&self) -> ExternalAuthProviderDescriptor
fn descriptor(&self) -> ExternalAuthProviderDescriptor
Returns static provider metadata and capability flags.
Builds an authorization URL and state values for a browser redirect.
Sourcefn 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 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.
Sourcefn 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,
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.