pub struct OAuthClient { /* private fields */ }Implementations§
Source§impl OAuthClient
impl OAuthClient
pub fn new(config: Arc<HighLevelConfig>, inner: Client) -> Self
Build the authorization URL to redirect the user to for consent.
Sourcepub async fn exchange_code(&self, code: &str) -> Result<TokenData>
pub async fn exchange_code(&self, code: &str) -> Result<TokenData>
Exchange an authorization code for an access + refresh token pair.
Sourcepub async fn refresh_token(&self, refresh_token: &str) -> Result<TokenData>
pub async fn refresh_token(&self, refresh_token: &str) -> Result<TokenData>
Use a refresh token to obtain a new access token.
Auto Trait Implementations§
impl !RefUnwindSafe for OAuthClient
impl !UnwindSafe for OAuthClient
impl Freeze for OAuthClient
impl Send for OAuthClient
impl Sync for OAuthClient
impl Unpin for OAuthClient
impl UnsafeUnpin for OAuthClient
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