pub struct TokenBundle {
pub access_token: String,
pub refresh_token: Option<String>,
pub token_type: String,
pub expires_in: u64,
pub refresh_expires_in: Option<u64>,
pub scope: Vec<String>,
}Expand description
Canonical TokenBundle from spec/auth/_shared/0.1/tokens.schema.json.
OAuth 2.0 (RFC 6749 §5.1)-shaped: expiresIn is seconds from
issuance, not an absolute timestamp. Clients compute the absolute
expiry as now() + expires_in immediately after issuance, or
store the issuance moment alongside the bundle.
Fields§
§access_token: String§refresh_token: Option<String>§token_type: String§expires_in: u64§refresh_expires_in: Option<u64>§scope: Vec<String>Trait Implementations§
Source§impl Clone for TokenBundle
impl Clone for TokenBundle
Source§fn clone(&self) -> TokenBundle
fn clone(&self) -> TokenBundle
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 TokenBundle
impl Debug for TokenBundle
Source§impl<'de> Deserialize<'de> for TokenBundle
impl<'de> Deserialize<'de> for TokenBundle
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 TokenBundle
impl RefUnwindSafe for TokenBundle
impl Send for TokenBundle
impl Sync for TokenBundle
impl Unpin for TokenBundle
impl UnsafeUnpin 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