pub enum SessionInvalidationReason {
Show 13 variants
Logout,
Expired,
UserRequested,
AdministrativeRevoke,
PasswordReset,
PasswordResetByOther,
MfaEnabled,
MfaDisabled,
MfaDisabledByOther,
AuthorityEscalation,
EmergencyRecovery,
RoleChangedByOther,
TrustEscalation,
}Expand description
Why a session is being invalidated. Drives both the audit
action_type and decisions about whether to clear remembered MFA
or mint a replacement session.
All invalidate_sessions callers pass one of these — the engine
is the single writer of revoked_at. Free-form reasons are not
allowed; doctrine 22 (“centralized invalidation”) in
DESIGN_SYSTEM.md.
Variants§
Logout
Expired
UserRequested
AdministrativeRevoke
PasswordReset
PasswordResetByOther
MfaEnabled
MfaDisabled
MfaDisabledByOther
AuthorityEscalation
EmergencyRecovery
RoleChangedByOther
A user’s role was changed by another actor (R2 admin role
edit, or R4 CLI rustio-admin user promote). The target’s
existing sessions still authorise the pre-change tier;
revoking them forces a fresh login that picks up the new
authority. R4 commit #7 wires emission; see
DESIGN_R4_EMERGENCY.md §7.
TrustEscalation
Token rotation that accompanies a trust escalation
(Authenticated → Elevated, etc.). The replacement session is
minted as the parent’s child; this revokes the old token.
Implementations§
Trait Implementations§
Source§impl Clone for SessionInvalidationReason
impl Clone for SessionInvalidationReason
Source§fn clone(&self) -> SessionInvalidationReason
fn clone(&self) -> SessionInvalidationReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SessionInvalidationReason
impl Debug for SessionInvalidationReason
Source§impl PartialEq for SessionInvalidationReason
impl PartialEq for SessionInvalidationReason
Source§fn eq(&self, other: &SessionInvalidationReason) -> bool
fn eq(&self, other: &SessionInvalidationReason) -> bool
self and other values to be equal, and is used by ==.impl Copy for SessionInvalidationReason
impl Eq for SessionInvalidationReason
impl StructuralPartialEq for SessionInvalidationReason
Auto Trait Implementations§
impl Freeze for SessionInvalidationReason
impl RefUnwindSafe for SessionInvalidationReason
impl Send for SessionInvalidationReason
impl Sync for SessionInvalidationReason
impl Unpin for SessionInvalidationReason
impl UnsafeUnpin for SessionInvalidationReason
impl UnwindSafe for SessionInvalidationReason
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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§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>
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>
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