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
Auto Trait Implementations
impl<T> RefUnwindSafe for IdentityService<T> where
T: RefUnwindSafe,
impl<T> !Send for IdentityService<T>
impl<T> !Sync for IdentityService<T>
impl<T> Unpin for IdentityService<T>
impl<T> UnwindSafe for IdentityService<T> where
T: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more