Trait actix_web_httpauth::extractors::AuthExtractor[][src]

pub trait AuthExtractor: Sized {
    type Error: Into<Error>;
    type Future: Future<Output = Result<Self, Self::Error>>;
    fn from_service_request(req: &ServiceRequest) -> Self::Future;
}

Trait implemented by types that can extract HTTP authentication scheme credentials from the request.

It is very similar to actix’ FromRequest trait, except it operates with a ServiceRequest struct instead, therefore it can be used in the middlewares.

You will not need it unless you want to implement your own authentication scheme.

Associated Types

type Error: Into<Error>[src]

The associated error which can be returned.

type Future: Future<Output = Result<Self, Self::Error>>[src]

Future that resolves into extracted credentials type.

Loading content...

Required methods

fn from_service_request(req: &ServiceRequest) -> Self::Future[src]

Parse the authentication credentials from the actix’ ServiceRequest.

Loading content...

Implementors

impl AuthExtractor for BasicAuth[src]

type Error = AuthenticationError<Challenge>

type Future = Ready<Result<Self, Self::Error>>

impl AuthExtractor for BearerAuth[src]

type Future = Ready<Result<Self, Self::Error>>

type Error = AuthenticationError<Bearer>

Loading content...