pub struct OAuthTokenExchangeParams {
pub code: String,
pub redirect_uri: String,
pub client_id: String,
pub client_secret: Option<String>,
pub code_verifier: Option<String>,
}Expand description
Parameters for exchanging an authorization code for tokens.
Fields§
§code: String§redirect_uri: String§client_id: String§client_secret: Option<String>§code_verifier: Option<String>Implementations§
Source§impl OAuthTokenExchangeParams
impl OAuthTokenExchangeParams
Sourcepub fn new(code: &str, redirect_uri: &str, client_id: &str) -> Self
pub fn new(code: &str, redirect_uri: &str, client_id: &str) -> Self
Create params with required fields.
Sourcepub fn client_secret(self, secret: &str) -> Self
pub fn client_secret(self, secret: &str) -> Self
Set the client secret (for confidential clients).
Sourcepub fn code_verifier(self, verifier: &str) -> Self
pub fn code_verifier(self, verifier: &str) -> Self
Set the PKCE code verifier.
Sourcepub fn pkce_verifier(self, verifier: &PkceCodeVerifier) -> Self
pub fn pkce_verifier(self, verifier: &PkceCodeVerifier) -> Self
Set the PKCE code verifier from a PkceCodeVerifier.
Trait Implementations§
Source§impl Clone for OAuthTokenExchangeParams
impl Clone for OAuthTokenExchangeParams
Source§fn clone(&self) -> OAuthTokenExchangeParams
fn clone(&self) -> OAuthTokenExchangeParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OAuthTokenExchangeParams
impl RefUnwindSafe for OAuthTokenExchangeParams
impl Send for OAuthTokenExchangeParams
impl Sync for OAuthTokenExchangeParams
impl Unpin for OAuthTokenExchangeParams
impl UnsafeUnpin for OAuthTokenExchangeParams
impl UnwindSafe for OAuthTokenExchangeParams
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