Struct actix_web_security::authentication::middleware::HttpAuthenticationMiddleware [−][src]
pub struct HttpAuthenticationMiddleware<T, U> where
T: AuthorizationHeaderExtractor + Clone,
U: EndpointMatcher + Clone, { /* fields omitted */ }
The HttpAuthenticationMiddleware
is an actix middleware that wraps client requets, initiates
and orchestrates the authentication process.
A HttpAuthenticationMiddleware
is specific for the type of the authorization header extraction
and a set of endpoints.
Implementations
impl<T: AuthorizationHeaderExtractor + Clone, U: EndpointMatcher + Clone> HttpAuthenticationMiddleware<T, U>
[src]
impl<T: AuthorizationHeaderExtractor + Clone, U: EndpointMatcher + Clone> HttpAuthenticationMiddleware<T, U>
[src]pub fn new(
provider_manager: ProviderManager,
authorization_extractor: Box<T>,
endpoint_matcher: Box<U>
) -> HttpAuthenticationMiddleware<T, U>
[src]
provider_manager: ProviderManager,
authorization_extractor: Box<T>,
endpoint_matcher: Box<U>
) -> HttpAuthenticationMiddleware<T, U>
Constructs a new instance of HttpAuthenticationMiddleware
for a given
ProviderManager
, a boxed AuthorizationHeaderExtractor
and a boxed
EndpointMatcher
.
Trait Implementations
impl<S, B, T, U> Transform<S> for HttpAuthenticationMiddleware<T, U> where
T: AuthorizationHeaderExtractor + Clone + 'static,
U: EndpointMatcher + Clone,
S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error> + 'static,
[src]
impl<S, B, T, U> Transform<S> for HttpAuthenticationMiddleware<T, U> where
T: AuthorizationHeaderExtractor + Clone + 'static,
U: EndpointMatcher + Clone,
S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error> + 'static,
[src]type Request = ServiceRequest
Requests handled by the service.
type Response = ServiceResponse<B>
Responses given by the service.
type Error = Error
Errors produced by the service.
type Transform = HttpAuthenticationService<S, T, U>
The TransformService
value created by this factory
type InitError = ()
Errors produced while building a transform service.
type Future = Ready<Result<Self::Transform, Self::InitError>>
The future response value.
fn new_transform(&self, service: S) -> Self::Future
[src]
pub fn map_init_err<F, E>(self, f: F) -> TransformMapInitErr<Self, S, F, E> where
F: Fn(Self::InitError) -> E + Clone,
F: Fn(Self::InitError) -> E + Clone,
Auto Trait Implementations
impl<T, U> !RefUnwindSafe for HttpAuthenticationMiddleware<T, U>
impl<T, U> !RefUnwindSafe for HttpAuthenticationMiddleware<T, U>
impl<T, U> Send for HttpAuthenticationMiddleware<T, U>
impl<T, U> Send for HttpAuthenticationMiddleware<T, U>
impl<T, U> Sync for HttpAuthenticationMiddleware<T, U>
impl<T, U> Sync for HttpAuthenticationMiddleware<T, U>
impl<T, U> Unpin for HttpAuthenticationMiddleware<T, U>
impl<T, U> Unpin for HttpAuthenticationMiddleware<T, U>
impl<T, U> !UnwindSafe for HttpAuthenticationMiddleware<T, U>
impl<T, U> !UnwindSafe for HttpAuthenticationMiddleware<T, U>
Blanket Implementations
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,