pub struct AuthenticateResponse {
pub session: Session,
pub tokens: TokenBundle,
}Expand description
Server responds from POST /auth/. Conforms to
spec/auth/authenticate/0.1#response: { session, tokens }.
Fields§
§session: Session§tokens: TokenBundleImplementations§
Source§impl AuthenticateResponse
impl AuthenticateResponse
Sourcepub fn access_expires_at_epoch(&self) -> Option<u64>
pub fn access_expires_at_epoch(&self) -> Option<u64>
Absolute Unix-second expiry of the access token, computed from
session.issued_at + tokens.expires_in. Convenience for
callers that need an epoch (e.g. JWT exp comparison, audit
logs). Returns None if session.issued_at fails to parse as
RFC 3339.
Sourcepub fn refresh_expires_at_epoch(&self) -> Option<u64>
pub fn refresh_expires_at_epoch(&self) -> Option<u64>
Absolute Unix-second expiry of the refresh token, when one was
issued. Returns None if no refresh token or if the issued-at
timestamp fails to parse.
Trait Implementations§
Source§impl Clone for AuthenticateResponse
impl Clone for AuthenticateResponse
Source§fn clone(&self) -> AuthenticateResponse
fn clone(&self) -> AuthenticateResponse
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 AuthenticateResponse
impl Debug for AuthenticateResponse
Source§impl<'de> Deserialize<'de> for AuthenticateResponse
impl<'de> Deserialize<'de> for AuthenticateResponse
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 AuthenticateResponse
impl RefUnwindSafe for AuthenticateResponse
impl Send for AuthenticateResponse
impl Sync for AuthenticateResponse
impl Unpin for AuthenticateResponse
impl UnsafeUnpin for AuthenticateResponse
impl UnwindSafe for AuthenticateResponse
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