Struct yup_oauth2::storage::TokenInfo [−][src]
pub struct TokenInfo {
pub access_token: String,
pub refresh_token: Option<String>,
pub expires_at: Option<DateTime<Utc>>,
}
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: String
used when authenticating calls to oauth2 enabled services.
refresh_token: Option<String>
used to refresh an expired access_token.
expires_at: Option<DateTime<Utc>>
The time when the token expires.
Implementations
Returns true if we are expired.
Trait Implementations
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 RefUnwindSafe for TokenInfo
impl UnwindSafe for TokenInfo
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more