pub struct SessionConfig {
pub default_duration: Duration,
pub max_duration: Duration,
pub max_sessions_per_user: usize,
pub enable_jwt: bool,
pub jwt_config: JwtConfig,
pub enable_refresh: bool,
pub refresh_duration: Duration,
pub cleanup_interval: Duration,
pub extend_on_access: bool,
pub extension_duration: Duration,
}
Expand description
Configuration for session management
Fields§
§default_duration: Duration
Default session duration
max_duration: Duration
Maximum session duration
max_sessions_per_user: usize
Maximum sessions per user
enable_jwt: bool
Enable JWT tokens for sessions
jwt_config: JwtConfig
JWT configuration
enable_refresh: bool
Enable session refresh
refresh_duration: Duration
Refresh token duration
cleanup_interval: Duration
Cleanup interval for expired sessions
extend_on_access: bool
Enable session extension on access
extension_duration: Duration
Session extension duration
Trait Implementations§
Source§impl Clone for SessionConfig
impl Clone for SessionConfig
Source§fn clone(&self) -> SessionConfig
fn clone(&self) -> SessionConfig
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 SessionConfig
impl Debug for SessionConfig
Auto Trait Implementations§
impl Freeze for SessionConfig
impl RefUnwindSafe for SessionConfig
impl Send for SessionConfig
impl Sync for SessionConfig
impl Unpin for SessionConfig
impl UnwindSafe for SessionConfig
Blanket Implementations§
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