pub trait AuthenticationService<S: Subject>:
Send
+ Sync
+ Sized
+ Clone
+ 'static
+ Send {
// Required methods
fn header_name(&self) -> &str;
fn cookie_name(&self) -> &str;
fn authenticate(
&self,
token: Option<&str>,
cookie: Option<&str>,
) -> impl Future<Output = Result<S>> + Send;
}
Expand description
Authentication service
Required Methods§
Sourcefn header_name(&self) -> &str
fn header_name(&self) -> &str
Header name containing the authentication header
Cookie name containing the authentication cookie
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.