pub struct TokenRequest {
pub code: Option<String>,
pub redirect_uri: Option<String>,
pub code_verifier: Option<String>,
pub refresh_token: Option<String>,
pub username: Option<String>,
pub password: Option<String>,
pub client_id: Option<String>,
pub client_secret: Option<String>,
pub scope: Option<String>,
pub access_type: Option<String>,
}Expand description
Optional parameters for the OAuth token endpoint. Set the fields relevant to your grant type
(e.g. code + redirect_uri + code_verifier for authorization_code, refresh_token for
refresh_token, username + password for password, client_id + client_secret for
client_credentials); leave the rest at their default None.
The Debug impl redacts the secret-bearing fields (code, code_verifier,
refresh_token, password, client_secret), showing only whether each is set.
Fields§
§code: Option<String>Authorization code from the redirect (authorization_code grant).
redirect_uri: Option<String>Redirect URI registered for your application (must match the authorize request).
code_verifier: Option<String>PKCE code verifier matching the code_challenge sent to /oauth/authorize.
refresh_token: Option<String>Refresh token to exchange (refresh_token grant).
username: Option<String>Resource-owner username (password grant).
password: Option<String>Resource-owner password (password grant).
client_id: Option<String>OAuth2 application client id.
client_secret: Option<String>OAuth2 application client secret (client_credentials grant).
scope: Option<String>Space-separated scopes to request.
access_type: Option<String>e.g. "offline" to request a refresh token alongside the access token.
Trait Implementations§
Source§impl Clone for TokenRequest
impl Clone for TokenRequest
Source§fn clone(&self) -> TokenRequest
fn clone(&self) -> TokenRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more