Struct yup_oauth2::storage::TokenInfo
source · pub struct TokenInfo {
pub access_token: Option<String>,
pub refresh_token: Option<String>,
pub expires_at: Option<OffsetDateTime>,
pub id_token: Option<String>,
}
Expand description
Represents a token as returned by OAuth2 servers.
It is produced by all authentication flows. It authenticates certain operations, and must be refreshed once it reached it’s expiry date.
Fields§
§access_token: Option<String>
used when authorizing calls to oauth2 enabled services.
refresh_token: Option<String>
used to refresh an expired access_token.
expires_at: Option<OffsetDateTime>
The time when the token expires.
id_token: Option<String>
Optionally included by the OAuth2 server and may contain information to verify the identity used to obtain the access token. Specifically Google API:s include this if the additional scopes “email” and/or “profile” are used. In that case the content is an JWT token.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for TokenInfo
impl<'de> Deserialize<'de> for TokenInfo
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
source§impl From<TokenInfo> for AccessToken
impl From<TokenInfo> for AccessToken
source§impl PartialEq for TokenInfo
impl PartialEq for TokenInfo
impl StructuralPartialEq for TokenInfo
Auto Trait Implementations§
impl Freeze for TokenInfo
impl RefUnwindSafe for TokenInfo
impl Send for TokenInfo
impl Sync for TokenInfo
impl Unpin for TokenInfo
impl UnwindSafe for TokenInfo
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)