pub trait AuthenticationExtension: Sized + 'static {
// Required methods
fn new(config: Configuration) -> Result<Self, Error>;
fn authenticate(&mut self, headers: Headers) -> Result<Token, ErrorResponse>;
}Expand description
A trait that extends Extension and provides authentication functionality.
Required Methods§
Sourcefn new(config: Configuration) -> Result<Self, Error>
fn new(config: Configuration) -> Result<Self, Error>
Sourcefn authenticate(&mut self, headers: Headers) -> Result<Token, ErrorResponse>
fn authenticate(&mut self, headers: Headers) -> Result<Token, ErrorResponse>
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.