pub struct SessionConfigBuilder { /* private fields */ }Expand description
A builder for SessionConfig
Implementations§
Source§impl SessionConfigBuilder
impl SessionConfigBuilder
Sourcepub fn default_duration(self, duration: Duration) -> Self
pub fn default_duration(self, duration: Duration) -> Self
Sourcepub fn max_duration(self, duration: Duration) -> Self
pub fn max_duration(self, duration: Duration) -> Self
Sourcepub fn idle_timeout(self, timeout: Duration) -> Self
pub fn idle_timeout(self, timeout: Duration) -> Self
Sourcepub fn rotate_on_privilege_escalation(self, rotate: bool) -> Self
pub fn rotate_on_privilege_escalation(self, rotate: bool) -> Self
Sourcepub fn rotate_periodically(self, rotate: bool) -> Self
pub fn rotate_periodically(self, rotate: bool) -> Self
Sourcepub fn rotation_interval(self, interval: Duration) -> Self
pub fn rotation_interval(self, interval: Duration) -> Self
Sourcepub fn max_concurrent_sessions(self, max: u32) -> Self
pub fn max_concurrent_sessions(self, max: u32) -> Self
Sourcepub fn allowed_countries(self, countries: Vec<String>) -> Self
pub fn allowed_countries(self, countries: Vec<String>) -> Self
Set the list of allowed countries (ISO 3166-1 alpha-2 codes).
Only meaningful when enforce_geographic_restrictions is enabled
(e.g. via for_high_security()).
Sourcepub fn for_web_app() -> Self
pub fn for_web_app() -> Self
Sourcepub fn for_api_service() -> Self
pub fn for_api_service() -> Self
Sourcepub fn for_high_security() -> Self
pub fn for_high_security() -> Self
Sourcepub fn build(self) -> SessionConfig
pub fn build(self) -> SessionConfig
Build the SessionConfig.
§Example
ⓘ
let config = SessionConfigBuilder::default()
.default_duration(Duration::from_secs(7200))
.max_concurrent_sessions(3)
.build();Trait Implementations§
Auto Trait Implementations§
impl Freeze for SessionConfigBuilder
impl RefUnwindSafe for SessionConfigBuilder
impl Send for SessionConfigBuilder
impl Sync for SessionConfigBuilder
impl Unpin for SessionConfigBuilder
impl UnsafeUnpin for SessionConfigBuilder
impl UnwindSafe for SessionConfigBuilder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more