pub struct Oauth2Client(/* private fields */);Implementations§
Source§impl Oauth2Client
impl Oauth2Client
pub fn new( client_id: impl ToString, client_secret: impl ToString, callback_url: Url, ) -> Self
pub fn auth_url( &self, challenge: PkceCodeChallenge, scopes: impl IntoIterator<Item = Scope>, ) -> (Url, CsrfToken)
pub async fn request_token( &self, code: AuthorizationCode, verifier: PkceCodeVerifier, ) -> Result<Oauth2Token>
pub async fn revoke_token(&self, token: StandardRevocableToken) -> Result<()>
pub async fn refresh_token(&self, token: &RefreshToken) -> Result<Oauth2Token>
pub async fn refresh_token_if_expired( &self, token: &mut Oauth2Token, ) -> Result<bool>
Trait Implementations§
Source§impl Clone for Oauth2Client
impl Clone for Oauth2Client
Source§fn clone(&self) -> Oauth2Client
fn clone(&self) -> Oauth2Client
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 Oauth2Client
impl RefUnwindSafe for Oauth2Client
impl Send for Oauth2Client
impl Sync for Oauth2Client
impl Unpin for Oauth2Client
impl UnwindSafe for Oauth2Client
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