pub struct OAuthFlow { /* private fields */ }Expand description
OAuth2 Authorization Code Flow with PKCE
Implementations§
Source§impl OAuthFlow
impl OAuthFlow
Build authorization URL with PKCE
Sourcepub async fn exchange_code(
&self,
context: &AuthorizeContext,
code: &str,
) -> Result<OAuthTokens>
pub async fn exchange_code( &self, context: &AuthorizeContext, code: &str, ) -> Result<OAuthTokens>
Exchange authorization code for tokens
Sourcepub async fn refresh(&self, refresh_token: &str) -> Result<OAuthTokens>
pub async fn refresh(&self, refresh_token: &str) -> Result<OAuthTokens>
Refresh access token using refresh token
Sourcepub async fn revoke_refresh_token(&self, refresh_token: &str) -> Result<()>
pub async fn revoke_refresh_token(&self, refresh_token: &str) -> Result<()>
Revoke a refresh token via Google’s revocation endpoint.
Auto Trait Implementations§
impl Freeze for OAuthFlow
impl !RefUnwindSafe for OAuthFlow
impl Send for OAuthFlow
impl Sync for OAuthFlow
impl Unpin for OAuthFlow
impl !UnwindSafe for OAuthFlow
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