Struct actix_loginmanager::LoginManager
source · pub struct LoginManager<D>(_)
where
D: DecodeRequest;
Expand description
LoginManager
D
the type of DecodeRequest. It decode the key_string from request.
Implementations§
source§impl<D> LoginManager<D>where
D: DecodeRequest,
impl<D> LoginManager<D>where D: DecodeRequest,
pub fn new(decoder: D) -> Selfwhere D: DecodeRequest,
sourcepub fn redirect(self, redirect: bool) -> Self
pub fn redirect(self, redirect: bool) -> Self
Set false, not redirect when user is not authenticated. Default true.
sourcepub fn login_view(self, login_view: String) -> Self
pub fn login_view(self, login_view: String) -> Self
Set the login url redirect, default ‘/login’.
Trait Implementations§
source§impl<S, B, D> Transform<S, ServiceRequest> for LoginManager<D>where
S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
S::Future: 'static,
B: 'static,
D: DecodeRequest + 'static,
impl<S, B, D> Transform<S, ServiceRequest> for LoginManager<D>where S: Service<ServiceRequest, Response = ServiceResponse<B>, Error = Error>, S::Future: 'static, B: 'static, D: DecodeRequest + 'static,
§type Response = ServiceResponse<B>
type Response = ServiceResponse<B>
Responses produced by the service.
§type Future = Ready<Result<<LoginManager<D> as Transform<S, ServiceRequest>>::Transform, <LoginManager<D> as Transform<S, ServiceRequest>>::InitError>>
type Future = Ready<Result<<LoginManager<D> as Transform<S, ServiceRequest>>::Transform, <LoginManager<D> as Transform<S, ServiceRequest>>::InitError>>
The future response value.
source§fn new_transform(&self, service: S) -> Self::Future
fn new_transform(&self, service: S) -> Self::Future
Creates and returns a new Transform component, asynchronously