pub struct HttpAuthExtractor { /* private fields */ }
Expand description
HTTP authentication extractor
Implementations§
Source§impl HttpAuthExtractor
impl HttpAuthExtractor
Sourcepub fn new(config: HttpAuthConfig) -> Self
pub fn new(config: HttpAuthConfig) -> Self
Create a new HTTP authentication extractor
Trait Implementations§
Source§impl AuthExtractor for HttpAuthExtractor
impl AuthExtractor for HttpAuthExtractor
Source§fn extract_auth<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 TransportRequest,
) -> Pin<Box<dyn Future<Output = AuthExtractionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn extract_auth<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 TransportRequest,
) -> Pin<Box<dyn Future<Output = AuthExtractionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Extract authentication from a transport request
Source§fn transport_type(&self) -> TransportType
fn transport_type(&self) -> TransportType
Get the transport type this extractor handles
Source§fn can_handle(&self, request: &TransportRequest) -> bool
fn can_handle(&self, request: &TransportRequest) -> bool
Check if this extractor can handle the given request
Source§fn validate_auth<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 TransportAuthContext,
) -> Pin<Box<dyn Future<Output = Result<(), TransportAuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn validate_auth<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 TransportAuthContext,
) -> Pin<Box<dyn Future<Output = Result<(), TransportAuthError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Validate the extracted authentication (optional hook)
Auto Trait Implementations§
impl Freeze for HttpAuthExtractor
impl RefUnwindSafe for HttpAuthExtractor
impl Send for HttpAuthExtractor
impl Sync for HttpAuthExtractor
impl Unpin for HttpAuthExtractor
impl UnwindSafe for HttpAuthExtractor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more