pub enum SessionFixationStrategy {
MigrateSession,
NewSession,
None,
}Expand description
Strategy for session fixation protection.
§Spring Security Equivalent
Similar to SessionFixationProtectionStrategy in Spring Security.
Session fixation attacks occur when an attacker sets a user’s session ID before they authenticate. After authentication, the attacker can hijack the session using the known session ID.
Variants§
MigrateSession
Create a new session and migrate all attributes from the old session. This is the safest option that preserves user data.
§Spring Equivalent
SessionFixationProtectionStrategy.MIGRATE_SESSION
NewSession
Create a new session without migrating attributes. Use this when you want a completely fresh session after login.
§Spring Equivalent
SessionFixationProtectionStrategy.NEW_SESSION
None
No session fixation protection. WARNING: This is insecure and should only be used for testing.
§Spring Equivalent
SessionFixationProtectionStrategy.NONE
Trait Implementations§
Source§impl Clone for SessionFixationStrategy
impl Clone for SessionFixationStrategy
Source§fn clone(&self) -> SessionFixationStrategy
fn clone(&self) -> SessionFixationStrategy
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 SessionFixationStrategy
impl Debug for SessionFixationStrategy
Source§impl Default for SessionFixationStrategy
impl Default for SessionFixationStrategy
Source§fn default() -> SessionFixationStrategy
fn default() -> SessionFixationStrategy
Returns the “default value” for a type. Read more
Source§impl PartialEq for SessionFixationStrategy
impl PartialEq for SessionFixationStrategy
impl Copy for SessionFixationStrategy
impl Eq for SessionFixationStrategy
impl StructuralPartialEq for SessionFixationStrategy
Auto Trait Implementations§
impl Freeze for SessionFixationStrategy
impl RefUnwindSafe for SessionFixationStrategy
impl Send for SessionFixationStrategy
impl Sync for SessionFixationStrategy
impl Unpin for SessionFixationStrategy
impl UnwindSafe for SessionFixationStrategy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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