pub struct Session {
pub did: Did,
pub handle: Handle,
pub access_jwt: String,
pub refresh_jwt: String,
pub email: Option<String>,
pub email_confirmed: Option<bool>,
}Expand description
Session data for an authenticated agent.
did and handle are typed as the validated proto_blue_syntax
newtypes so callers can’t accidentally pass random strings; the
JWTs and email stay as String (no validated newtype exists for
either, and over-validating an opaque token would just mean
re-parsing on every request).
Fields§
§did: Did§handle: Handle§access_jwt: String§refresh_jwt: String§email: Option<String>§email_confirmed: Option<bool>Trait Implementations§
Source§impl<'de> Deserialize<'de> for Session
impl<'de> Deserialize<'de> for Session
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
Auto Trait Implementations§
impl Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe for Session
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