pub trait AuthProvider: Send + Sync {
// Required method
fn validate_request<'life0, 'life1, 'async_trait>(
&'life0 self,
parts: &'life1 dyn RequestParts,
) -> Pin<Box<dyn Future<Output = Result<AuthContext, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Expand description
Trait for authentication providers
Required Methods§
Sourcefn validate_request<'life0, 'life1, 'async_trait>(
&'life0 self,
parts: &'life1 dyn RequestParts,
) -> Pin<Box<dyn Future<Output = Result<AuthContext, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn validate_request<'life0, 'life1, 'async_trait>(
&'life0 self,
parts: &'life1 dyn RequestParts,
) -> Pin<Box<dyn Future<Output = Result<AuthContext, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Validate a request and return authentication context