pub trait IdentityPolicy: Sized + 'static {
    type Future: Future<Output = Result<Option<String>, Error>>;
    type ResponseFuture: Future<Output = Result<(), Error>>;

    fn from_request(&self, req: &mut ServiceRequest) -> Self::Future;
    fn to_response<B>(
        &self,
        identity: Option<String>,
        changed: bool,
        response: &mut ServiceResponse<B>
    ) -> Self::ResponseFuture; }
Expand description

Identity policy.

Required Associated Types

The return type of the middleware

The return type of the middleware

Required Methods

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

Write changes to response

Implementors