pub struct IdentityService<T> { /* fields omitted */ }
Request identity middleware
use actix_web::middleware::identity::{CookieIdentityPolicy, IdentityService};
use actix_web::App;
fn main() {
let app = App::new().middleware(IdentityService::new(
CookieIdentityPolicy::new(&[0; 32])
.name("auth-cookie")
.secure(false),
));
}
[−]
Create new identity service with specified backend.
Method is called when request is ready. It may return future, which should resolve before next middleware get called. Read more
Method is called when handler returns response, but before sending http message to peer. Read more
Method is called after body stream get sent to peer.