Struct actix_identity::IdentityService [−][src]
pub struct IdentityService<T> { /* fields omitted */ }
Expand description
Request identity middleware
use actix_web::App;
use actix_identity::{CookieIdentityPolicy, IdentityService};
// create cookie identity backend
let policy = CookieIdentityPolicy::new(&[0; 32])
.name("auth-cookie")
.secure(false);
let app = App::new()
// wrap policy into identity middleware
.wrap(IdentityService::new(policy));
Implementations
Trait Implementations
impl<S, T, B> Transform<S, ServiceRequest> for IdentityService<T> where
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error> + 'static,
S::Future: 'static,
T: IdentityPolicy,
B: MessageBody + 'static,
B::Error: StdError,
impl<S, T, B> Transform<S, ServiceRequest> for IdentityService<T> where
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error> + 'static,
S::Future: 'static,
T: IdentityPolicy,
B: MessageBody + 'static,
B::Error: StdError,
type Response = ServiceResponse
type Response = ServiceResponse
Responses produced by the service.
type Error = Error
type Error = Error
Errors produced by the service.
type Transform = IdentityServiceMiddleware<S, T>
type Transform = IdentityServiceMiddleware<S, T>
The TransformService
value created by this factory
type Future = Ready<Result<Self::Transform, Self::InitError>>
type Future = Ready<Result<Self::Transform, Self::InitError>>
The future response value.
Creates and returns a new Transform component, asynchronously