pub struct BoundUserSession { /* private fields */ }Expand description
User session token bound to the authorised session certificate.
Implementations§
Source§impl BoundUserSession
impl BoundUserSession
Sourcepub fn new(
session_token: impl Into<String>,
identity: &AuthenticatedIdentity,
binding: DeviceSessionBinding,
created_at: OffsetDateTime,
expires_at: OffsetDateTime,
) -> Self
pub fn new( session_token: impl Into<String>, identity: &AuthenticatedIdentity, binding: DeviceSessionBinding, created_at: OffsetDateTime, expires_at: OffsetDateTime, ) -> Self
Creates a bound user session.
Sourcepub fn session_token(&self) -> &str
pub fn session_token(&self) -> &str
Returns the opaque user session token.
Sourcepub fn device_binding(&self) -> &DeviceSessionBinding
pub fn device_binding(&self) -> &DeviceSessionBinding
Returns the device-session binding.
Sourcepub fn created_at(&self) -> OffsetDateTime
pub fn created_at(&self) -> OffsetDateTime
Returns the session creation time.
Sourcepub fn expires_at(&self) -> OffsetDateTime
pub fn expires_at(&self) -> OffsetDateTime
Returns the session expiry time.
Sourcepub fn is_bound_to(&self, mtls: &MtlsClientIdentity) -> bool
pub fn is_bound_to(&self, mtls: &MtlsClientIdentity) -> bool
Returns true when this session is presented with its original mTLS certificate.
Trait Implementations§
Source§impl Clone for BoundUserSession
impl Clone for BoundUserSession
Source§fn clone(&self) -> BoundUserSession
fn clone(&self) -> BoundUserSession
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 BoundUserSession
impl Debug for BoundUserSession
Source§impl PartialEq for BoundUserSession
impl PartialEq for BoundUserSession
Source§fn eq(&self, other: &BoundUserSession) -> bool
fn eq(&self, other: &BoundUserSession) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for BoundUserSession
impl StructuralPartialEq for BoundUserSession
Auto Trait Implementations§
impl Freeze for BoundUserSession
impl RefUnwindSafe for BoundUserSession
impl Send for BoundUserSession
impl Sync for BoundUserSession
impl Unpin for BoundUserSession
impl UnsafeUnpin for BoundUserSession
impl UnwindSafe for BoundUserSession
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