Trait actix_identity::IdentityPolicy [−][src]
Identity policy definition.
Associated Types
type Future: Future<Output = Result<Option<String>, Error>>
[src]
The return type of the middleware
type ResponseFuture: Future<Output = Result<(), Error>>
[src]
The return type of the middleware
Required methods
fn from_request(&self, request: &mut ServiceRequest) -> Self::Future
[src]
Parse the session from request and load data from a service identity.
fn to_response<B>(
&self,
identity: Option<String>,
changed: bool,
response: &mut ServiceResponse<B>
) -> Self::ResponseFuture
[src]
&self,
identity: Option<String>,
changed: bool,
response: &mut ServiceResponse<B>
) -> Self::ResponseFuture
Write changes to response
Implementors
impl IdentityPolicy for CookieIdentityPolicy
[src]
type Future = Ready<Result<Option<String>, Error>>
type ResponseFuture = Ready<Result<(), Error>>
fn from_request(&self, req: &mut ServiceRequest) -> Self::Future
[src]
fn to_response<B>(
&self,
id: Option<String>,
changed: bool,
res: &mut ServiceResponse<B>
) -> Self::ResponseFuture
[src]
&self,
id: Option<String>,
changed: bool,
res: &mut ServiceResponse<B>
) -> Self::ResponseFuture