pub struct OAuthToken {
pub access_token: String,
pub token_type: String,
pub expires_in: Option<u64>,
pub refresh_token: Option<String>,
pub scope: Option<String>,
pub id_token: Option<String>,
}Expand description
Represents the tokens returned by an OAuth2 provider.
Fields§
§access_token: StringThe access token used for API requests
token_type: StringThe type of token (usually “Bearer”)
expires_in: Option<u64>Seconds until the access token expires
refresh_token: Option<String>The refresh token used to obtain new access tokens
scope: Option<String>The scopes granted by the user
id_token: Option<String>The OIDC ID Token
Trait Implementations§
Source§impl Clone for OAuthToken
impl Clone for OAuthToken
Source§fn clone(&self) -> OAuthToken
fn clone(&self) -> OAuthToken
Returns a duplicate of the value. Read more
1.0.0 · 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 OAuthToken
impl Debug for OAuthToken
Source§impl<'de> Deserialize<'de> for OAuthToken
impl<'de> Deserialize<'de> for OAuthToken
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 OAuthToken
impl RefUnwindSafe for OAuthToken
impl Send for OAuthToken
impl Sync for OAuthToken
impl Unpin for OAuthToken
impl UnwindSafe for OAuthToken
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