pub trait Scheme<User: Send + Sync + 'static> {
type Request: Any + Send + Sync;
// Required methods
fn authenticate<'life0, 'life1, 'life2, 'async_trait, S>(
&'life0 self,
state: &'life1 S,
auth_param: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<User>>> + Send + 'async_trait>>
where S: Storage<User, Self::Request> + Send + Sync + 'static + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn scheme_name() -> &'static str;
// Provided methods
fn should_401_on_multiple_values() -> bool { ... }
fn should_403_on_bad_auth() -> bool { ... }
fn header_name() -> &'static str { ... }
}
Required Associated Types§
Required Methods§
fn authenticate<'life0, 'life1, 'life2, 'async_trait, S>( &'life0 self, state: &'life1 S, auth_param: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<User>>> + Send + 'async_trait>>
fn scheme_name() -> &'static str
Provided Methods§
fn should_401_on_multiple_values() -> bool
fn should_403_on_bad_auth() -> bool
fn header_name() -> &'static str
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.