pub struct SessionRecord {
pub jti: Uuid,
pub actor_id: String,
pub created_at_us: i64,
pub expires_at_us: i64,
pub revoked_at_us: Option<i64>,
}Expand description
Persistent record of an issued JWT session.
Fields§
§jti: Uuid§actor_id: String§created_at_us: i64§expires_at_us: i64§revoked_at_us: Option<i64>Implementations§
Source§impl SessionRecord
impl SessionRecord
Sourcepub fn is_valid_at(&self, now_us: i64) -> bool
pub fn is_valid_at(&self, now_us: i64) -> bool
True iff the record exists, has not been revoked, and has not expired at the supplied wall-clock instant.
Trait Implementations§
Source§impl Clone for SessionRecord
impl Clone for SessionRecord
Source§fn clone(&self) -> SessionRecord
fn clone(&self) -> SessionRecord
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 SessionRecord
impl Debug for SessionRecord
Source§impl<'de> Deserialize<'de> for SessionRecord
impl<'de> Deserialize<'de> for SessionRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SessionRecord
impl PartialEq for SessionRecord
Source§impl Serialize for SessionRecord
impl Serialize for SessionRecord
impl StructuralPartialEq for SessionRecord
Auto Trait Implementations§
impl Freeze for SessionRecord
impl RefUnwindSafe for SessionRecord
impl Send for SessionRecord
impl Sync for SessionRecord
impl Unpin for SessionRecord
impl UnsafeUnpin for SessionRecord
impl UnwindSafe for SessionRecord
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