pub struct TokenBundle {
pub access_token: String,
pub refresh_token: String,
pub token_hash: String,
pub token_id: String,
pub expires_at: String,
pub response: AuthTokenResponse,
}Expand description
Pre-computed token bundle returned by prepare_token_bundle.
Contains everything needed to insert a refresh token and return the auth response. The caller only needs to perform the DB INSERT.
Fields§
§access_token: StringJWT access token.
refresh_token: StringRaw refresh token (sent to the client).
token_hash: StringSHA-256 hash of the refresh token (stored in DB).
token_id: StringUUID primary key for the refresh_tokens row.
expires_at: Stringdatetime string for the refresh token expiry (DB column value).
response: AuthTokenResponseReady-to-return API response.
Auto Trait Implementations§
impl Freeze for TokenBundle
impl RefUnwindSafe for TokenBundle
impl Send for TokenBundle
impl Sync for TokenBundle
impl Unpin for TokenBundle
impl UnwindSafe for TokenBundle
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