pub struct TokenPair {
pub access_token: String,
pub refresh_token: String,
pub access_expires_at: u64,
pub refresh_expires_at: u64,
}Expand description
A pair of JWT tokens issued on successful authentication or rotation.
The access_token is short-lived and used to authenticate API requests.
The refresh_token is long-lived and used to obtain a new token pair via
the rotate endpoint. Both *_expires_at fields are Unix timestamps in seconds.
Fields§
§access_token: StringShort-lived token used to authenticate API requests.
refresh_token: StringLong-lived token used to rotate the pair without re-authenticating.
access_expires_at: u64Unix timestamp (seconds) when the access token expires.
refresh_expires_at: u64Unix timestamp (seconds) when the refresh token expires.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TokenPair
impl<'de> Deserialize<'de> for TokenPair
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 TokenPair
impl RefUnwindSafe for TokenPair
impl Send for TokenPair
impl Sync for TokenPair
impl Unpin for TokenPair
impl UnsafeUnpin for TokenPair
impl UnwindSafe for TokenPair
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