pub struct SecureSessionManager { /* private fields */ }
Expand description
Secure session manager with comprehensive security controls
Implementations§
Source§impl SecureSessionManager
impl SecureSessionManager
Sourcepub fn new(config: SecureSessionConfig) -> Self
pub fn new(config: SecureSessionConfig) -> Self
Create a new secure session manager
Sourcepub fn create_session(
&self,
user_id: &str,
ip_address: &str,
user_agent: &str,
device_fingerprint: Option<DeviceFingerprint>,
secure_transport: bool,
) -> Result<SecureSession>
pub fn create_session( &self, user_id: &str, ip_address: &str, user_agent: &str, device_fingerprint: Option<DeviceFingerprint>, secure_transport: bool, ) -> Result<SecureSession>
Create a new secure session
Sourcepub fn get_session(&self, session_id: &str) -> Result<Option<SecureSession>>
pub fn get_session(&self, session_id: &str) -> Result<Option<SecureSession>>
Validate and retrieve session
Sourcepub fn update_session_activity(
&self,
session_id: &str,
ip_address: &str,
user_agent: &str,
) -> Result<()>
pub fn update_session_activity( &self, session_id: &str, ip_address: &str, user_agent: &str, ) -> Result<()>
Update session activity and validate security
Sourcepub fn rotate_session(&self, session_id: &str) -> Result<String>
pub fn rotate_session(&self, session_id: &str) -> Result<String>
Rotate session ID for security
Sourcepub fn revoke_session(&self, session_id: &str) -> Result<()>
pub fn revoke_session(&self, session_id: &str) -> Result<()>
Revoke a session
Sourcepub fn revoke_user_sessions(&self, user_id: &str) -> Result<u32>
pub fn revoke_user_sessions(&self, user_id: &str) -> Result<u32>
Revoke all sessions for a user
Sourcepub fn cleanup_expired_sessions(&self) -> Result<u32>
pub fn cleanup_expired_sessions(&self) -> Result<u32>
Clean up expired sessions
Auto Trait Implementations§
impl Freeze for SecureSessionManager
impl !RefUnwindSafe for SecureSessionManager
impl Send for SecureSessionManager
impl Sync for SecureSessionManager
impl Unpin for SecureSessionManager
impl !UnwindSafe for SecureSessionManager
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