pub struct SessionSecurityConfig {
pub enforce_ip_consistency: bool,
pub allow_ip_range_changes: bool,
pub max_user_agent_deviation: f32,
pub auto_rotate_on_suspicious_activity: bool,
pub max_session_lifetime_hours: u64,
pub require_periodic_validation: bool,
pub validation_period_minutes: u64,
pub enable_device_fingerprinting: bool,
pub max_concurrent_sessions: Option<usize>,
pub enable_geo_validation: bool,
pub max_geo_distance_km: Option<f64>,
}Expand description
Security configuration for session management
Fields§
§enforce_ip_consistency: boolWhether to enforce strict IP consistency for sessions
allow_ip_range_changes: boolAllow IP changes within the same subnet/range
max_user_agent_deviation: f32Maximum allowed User-Agent deviation (0.0 = exact match, 1.0 = any)
auto_rotate_on_suspicious_activity: boolWhether to automatically rotate session IDs on security events
max_session_lifetime_hours: u64Maximum session lifetime before forced re-authentication
require_periodic_validation: boolRequire periodic session validation
validation_period_minutes: u64Period between validation checks (in minutes)
enable_device_fingerprinting: boolEnable device fingerprinting for additional security
max_concurrent_sessions: Option<usize>Maximum number of concurrent sessions per user
enable_geo_validation: boolGeographic location validation
max_geo_distance_km: Option<f64>Maximum allowed distance for geographic changes (in km)
Implementations§
Trait Implementations§
Source§impl Clone for SessionSecurityConfig
impl Clone for SessionSecurityConfig
Source§fn clone(&self) -> SessionSecurityConfig
fn clone(&self) -> SessionSecurityConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SessionSecurityConfig
impl Debug for SessionSecurityConfig
Source§impl Default for SessionSecurityConfig
impl Default for SessionSecurityConfig
Source§impl<'de> Deserialize<'de> for SessionSecurityConfig
impl<'de> Deserialize<'de> for SessionSecurityConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SessionSecurityConfig
impl RefUnwindSafe for SessionSecurityConfig
impl Send for SessionSecurityConfig
impl Sync for SessionSecurityConfig
impl Unpin for SessionSecurityConfig
impl UnwindSafe for SessionSecurityConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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