pub trait AuthResolver:
Send
+ Sync
+ 'static {
// Required method
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
parts: &'life1 mut Parts,
) -> Pin<Box<dyn Future<Output = Option<AuthenticatedUser>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Required Methods§
Sourcefn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
parts: &'life1 mut Parts,
) -> Pin<Box<dyn Future<Output = Option<AuthenticatedUser>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
parts: &'life1 mut Parts,
) -> Pin<Box<dyn Future<Output = Option<AuthenticatedUser>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Attempt to authenticate the request. Return None to fall
through to OSS default-user behaviour (when
require_authentication is false) or to a 401 (when true).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".