Struct actix_identity::config::IdentityMiddlewareBuilder
source · pub struct IdentityMiddlewareBuilder { /* private fields */ }
Expand description
A fluent builder to construct an IdentityMiddleware
instance with custom configuration
parameters.
Use IdentityMiddleware::builder
to get started!
Implementations
sourceimpl IdentityMiddlewareBuilder
impl IdentityMiddlewareBuilder
sourcepub fn logout_behaviour(self, logout_behaviour: LogoutBehaviour) -> Self
pub fn logout_behaviour(self, logout_behaviour: LogoutBehaviour) -> Self
Determines how Identity::logout
affects the current session.
By default, the current session is purged (LogoutBehaviour::PurgeSession
).
sourcepub fn login_deadline(self, deadline: Option<Duration>) -> Self
pub fn login_deadline(self, deadline: Option<Duration>) -> Self
Automatically logs out users after a certain amount of time has passed since they logged in, regardless of their activity pattern.
If set to:
None
: login deadline is disabled.Some(duration)
: login deadline is enabled and users will be logged out afterduration
has passed since their login.
By default, login deadline is disabled.
sourcepub fn visit_deadline(self, deadline: Option<Duration>) -> Self
pub fn visit_deadline(self, deadline: Option<Duration>) -> Self
Automatically logs out users after a certain amount of time has passed since their last visit.
If set to:
None
: visit deadline is disabled.Some(duration)
: visit deadline is enabled and users will be logged out afterduration
has passed since their last visit.
By default, visit deadline is disabled.
sourcepub fn build(self) -> IdentityMiddleware
pub fn build(self) -> IdentityMiddleware
Finalises the builder and returns an IdentityMiddleware
instance.
Trait Implementations
sourceimpl Clone for IdentityMiddlewareBuilder
impl Clone for IdentityMiddlewareBuilder
sourcefn clone(&self) -> IdentityMiddlewareBuilder
fn clone(&self) -> IdentityMiddlewareBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl RefUnwindSafe for IdentityMiddlewareBuilder
impl Send for IdentityMiddlewareBuilder
impl Sync for IdentityMiddlewareBuilder
impl Unpin for IdentityMiddlewareBuilder
impl UnwindSafe for IdentityMiddlewareBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more