pub enum SessionValidationOutcome {
Authenticated {
subject: SubjectId,
session_id: SessionId,
expires_at: u64,
},
Unauthenticated,
}Expand description
The result of validating a session secret against the store (RFC-006 §13.3).
Variants§
Authenticated
Session is valid. The host application must still check authorization (RFC-001: codlet authenticates; the host authorizes).
Fields
Unauthenticated
No valid session: cookie absent, not found, expired, or revoked. All cases collapse to one response type to prevent enumeration (INV-8, RFC-006 §13.5).
Implementations§
Source§impl SessionValidationOutcome
impl SessionValidationOutcome
Sourcepub fn is_authenticated(&self) -> bool
pub fn is_authenticated(&self) -> bool
Return true if the outcome is SessionValidationOutcome::Authenticated.
Trait Implementations§
Source§impl Clone for SessionValidationOutcome
impl Clone for SessionValidationOutcome
Source§fn clone(&self) -> SessionValidationOutcome
fn clone(&self) -> SessionValidationOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SessionValidationOutcome
impl Debug for SessionValidationOutcome
impl Eq for SessionValidationOutcome
Source§impl PartialEq for SessionValidationOutcome
impl PartialEq for SessionValidationOutcome
Source§fn eq(&self, other: &SessionValidationOutcome) -> bool
fn eq(&self, other: &SessionValidationOutcome) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SessionValidationOutcome
Auto Trait Implementations§
impl Freeze for SessionValidationOutcome
impl RefUnwindSafe for SessionValidationOutcome
impl Send for SessionValidationOutcome
impl Sync for SessionValidationOutcome
impl Unpin for SessionValidationOutcome
impl UnsafeUnpin for SessionValidationOutcome
impl UnwindSafe for SessionValidationOutcome
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