pub trait AuthProvider: Send + Sync {
// Required methods
fn id(&self) -> &str;
fn capabilities(&self) -> AuthCapabilities;
fn begin<'life0, 'life1, 'async_trait>(
&'life0 self,
request: AuthRequest,
context: AuthContext<'life1>,
) -> Pin<Box<dyn Future<Output = Result<AuthProviderStep>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn continue_flow<'life0, 'life1, 'async_trait>(
&'life0 self,
state: SecretString,
response: AuthResponse,
context: AuthContext<'life1>,
) -> Pin<Box<dyn Future<Output = Result<AuthProviderStep>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn refresh<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 AuthSession,
context: AuthContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<AuthSession>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn verify<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 AuthSession,
context: AuthContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<AuthSession>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn logout<'life0, 'life1, 'async_trait>(
&'life0 self,
session: AuthSession,
context: AuthContext<'life1>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Stable compile-time extension contract for built-in and third-party providers.
Required Methods§
fn id(&self) -> &str
fn capabilities(&self) -> AuthCapabilities
fn begin<'life0, 'life1, 'async_trait>(
&'life0 self,
request: AuthRequest,
context: AuthContext<'life1>,
) -> Pin<Box<dyn Future<Output = Result<AuthProviderStep>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn continue_flow<'life0, 'life1, 'async_trait>(
&'life0 self,
state: SecretString,
response: AuthResponse,
context: AuthContext<'life1>,
) -> Pin<Box<dyn Future<Output = Result<AuthProviderStep>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn refresh<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 AuthSession,
context: AuthContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<AuthSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn verify<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 AuthSession,
context: AuthContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<AuthSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn logout<'life0, 'life1, 'async_trait>(
&'life0 self,
session: AuthSession,
context: AuthContext<'life1>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".