pub struct PendingExchange { /* private fields */ }Expand description
Opaque, serializable handle holding the PKCE verifier + state nonce between the authorize and token-exchange phases. The caller must persist it (signed cookie, session store, etc.) until the OAuth callback fires.
Treat the contents as a secret — leakage of the code_verifier would
let an attacker who intercepts the authorization code complete the
exchange.
Implementations§
Source§impl PendingExchange
impl PendingExchange
Sourcepub async fn complete(
self,
code: &str,
returned_state: &str,
http: &Client,
) -> AuthResult<CompletedSession>
pub async fn complete( self, code: &str, returned_state: &str, http: &Client, ) -> AuthResult<CompletedSession>
Phase 2 — verify the returned state, exchange code for tokens.
Returns a CompletedSession with the access token, instance URL,
and (if the connected app issued one) refresh token.
Trait Implementations§
Source§impl Clone for PendingExchange
impl Clone for PendingExchange
Source§fn clone(&self) -> PendingExchange
fn clone(&self) -> PendingExchange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PendingExchange
impl Debug for PendingExchange
Source§impl<'de> Deserialize<'de> for PendingExchange
impl<'de> Deserialize<'de> for PendingExchange
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PendingExchange
impl RefUnwindSafe for PendingExchange
impl Send for PendingExchange
impl Sync for PendingExchange
impl Unpin for PendingExchange
impl UnsafeUnpin for PendingExchange
impl UnwindSafe for PendingExchange
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