pub struct IssueAccessTokenSuccessParams {
pub access_token: SecretString,
pub token_type: String,
pub expires_in: Option<usize>,
pub refresh_token: Option<SecretString>,
pub scope: Option<String>,
pub issued_at: SystemTime,
}
oauth2
only.Expand description
The response returned by the authorization server when the access token request is valid and authorized.
The authorization server issues an access token and optional refresh token, and constructs the response by adding the following parameters to the entity-body of the HTTP response with a 200 (OK) status code.
Refs: https://datatracker.ietf.org/doc/html/rfc6749#section-5.1
Fields§
§access_token: SecretString
The access token issued by the authorization server.
token_type: String
The type of the token issued.
Refs: https://datatracker.ietf.org/doc/html/rfc6749#section-7.1
expires_in: Option<usize>
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.
refresh_token: Option<SecretString>
The refresh token.
The refresh token, which can be used to obtain new access tokens using the same authorization grant.
Refs: https://datatracker.ietf.org/doc/html/rfc6749#section-6
scope: Option<String>
The scope of the access token.
OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED.
Refs: https://datatracker.ietf.org/doc/html/rfc6749#section-3.3
issued_at: SystemTime
Time the access token was issued at.
This field does not belong to the specs, its sole purpose is to track whenever the token is expired or not.
Implementations§
Source§impl IssueAccessTokenSuccessParams
impl IssueAccessTokenSuccessParams
pub fn sync_expires_in(&mut self)
Trait Implementations§
Source§impl Clone for IssueAccessTokenSuccessParams
impl Clone for IssueAccessTokenSuccessParams
Source§fn clone(&self) -> IssueAccessTokenSuccessParams
fn clone(&self) -> IssueAccessTokenSuccessParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<'de> Deserialize<'de> for IssueAccessTokenSuccessParams
impl<'de> Deserialize<'de> for IssueAccessTokenSuccessParams
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 TryFrom<&[u8]> for IssueAccessTokenSuccessParams
Deserializes success params from JSON bytes.
impl TryFrom<&[u8]> for IssueAccessTokenSuccessParams
Deserializes success params from JSON bytes.