pub trait AuthorizationHeaderExtractor: Send + Sync {
// Required method
fn extract_token<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 HeaderMap,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Authentication>, AuthenticationError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
The trait of AuthorizationHeaderExtractor
to be implemented for a specific authentication scheme.
Takes a set of HTTP-Headers from the client request and extracts a token (in form of a boxed Authentication
) from the headers.