Struct oauth2::StandardToken
source · pub struct StandardToken { /* private fields */ }
Expand description
Standard OAuth2 token response.
This struct includes the fields defined in
Section 5.1 of RFC 6749, as well as
extensions defined by the EF
type parameter.
Trait Implementations§
source§impl Clone for StandardToken
impl Clone for StandardToken
source§fn clone(&self) -> StandardToken
fn clone(&self) -> StandardToken
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for StandardToken
impl Debug for StandardToken
source§impl<'de> Deserialize<'de> for StandardToken
impl<'de> Deserialize<'de> for StandardToken
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>,
source§impl PartialEq<StandardToken> for StandardToken
impl PartialEq<StandardToken> for StandardToken
source§fn eq(&self, other: &StandardToken) -> bool
fn eq(&self, other: &StandardToken) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for StandardToken
impl Serialize for StandardToken
source§impl Token for StandardToken
impl Token for StandardToken
source§fn access_token(&self) -> &AccessToken
fn access_token(&self) -> &AccessToken
REQUIRED. The access token issued by the authorization server.
source§fn token_type(&self) -> &TokenType
fn token_type(&self) -> &TokenType
REQUIRED. The type of the token issued as described in
Section 7.1.
Value is case insensitive and deserialized to the generic TokenType
parameter.
source§fn expires_in(&self) -> Option<Duration>
fn expires_in(&self) -> Option<Duration>
RECOMMENDED. The lifetime in seconds of the access token. For example, the value 3600 denotes that the access token will expire in one hour from the time the response was generated. If omitted, the authorization server SHOULD provide the expiration time via other means or document the default value.
source§fn refresh_token(&self) -> Option<&RefreshToken>
fn refresh_token(&self) -> Option<&RefreshToken>
OPTIONAL. The refresh token, which can be used to obtain new access tokens using the same authorization grant as described in Section 6.
source§fn scopes(&self) -> Option<&Vec<Scope>>
fn scopes(&self) -> Option<&Vec<Scope>>
OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED. The
scipe of the access token as described by
Section 3.3. If included in the response,
this space-delimited field is parsed into a Vec
of individual scopes. If omitted from
the response, this field is None
.