pub trait AuthenticationProvider {
// Required methods
fn name(&self) -> &str;
fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn handle_auth_request<'life0, 'async_trait>(
&'life0 self,
request: AuthRequest,
) -> Pin<Box<dyn Future<Output = Result<AuthResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn validate_credentials<'life0, 'life1, 'async_trait>(
&'life0 self,
credentials: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ValidationResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_metadata<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ProviderMetadata>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for server-side authentication providers
Required Methods§
Sourcefn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initialize the provider
Sourcefn handle_auth_request<'life0, 'async_trait>(
&'life0 self,
request: AuthRequest,
) -> Pin<Box<dyn Future<Output = Result<AuthResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_auth_request<'life0, 'async_trait>(
&'life0 self,
request: AuthRequest,
) -> Pin<Box<dyn Future<Output = Result<AuthResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle authentication request
Sourcefn validate_credentials<'life0, 'life1, 'async_trait>(
&'life0 self,
credentials: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ValidationResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn validate_credentials<'life0, 'life1, 'async_trait>(
&'life0 self,
credentials: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ValidationResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Validate credentials
Sourcefn get_metadata<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ProviderMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_metadata<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ProviderMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get provider metadata