[][src]Trait actix_web::middleware::identity::IdentityPolicy

pub trait IdentityPolicy<S>: Sized + 'static {
    type Identity: Identity;
    type Future: Future<Item = Self::Identity, Error = Error>;
    fn from_request(&self, request: &HttpRequest<S>) -> Self::Future;
}

Identity policy definition.

Associated Types

type Identity: Identity

The associated identity

type Future: Future<Item = Self::Identity, Error = Error>

The return type of the middleware

Loading content...

Required methods

fn from_request(&self, request: &HttpRequest<S>) -> Self::Future

Parse the session from request and load data from a service identity.

Loading content...

Implementors

impl<S> IdentityPolicy<S> for CookieIdentityPolicy[src]

type Identity = CookieIdentity

type Future = FutureResult<CookieIdentity, Error>

Loading content...