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 more
Auto 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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more