pub struct Authenticator<C>{ /* private fields */ }
Expand description
Authenticator is responsible for fetching tokens, handling refreshing tokens, and optionally persisting tokens to disk.
Implementations§
Source§impl<C> Authenticator<C>
impl<C> Authenticator<C>
Sourcepub async fn token<'a, T>(
&'a self,
scopes: &'a [T],
) -> Result<AccessToken, Error>
pub async fn token<'a, T>( &'a self, scopes: &'a [T], ) -> Result<AccessToken, Error>
Return the current token for the provided scopes.
Sourcepub async fn force_refreshed_token<'a, T>(
&'a self,
scopes: &'a [T],
) -> Result<AccessToken, Error>
pub async fn force_refreshed_token<'a, T>( &'a self, scopes: &'a [T], ) -> Result<AccessToken, Error>
Return a token for the provided scopes, but don’t reuse cached tokens. Instead, always fetch a new token from the OAuth server.
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for Authenticator<C>
impl<C> !RefUnwindSafe for Authenticator<C>
impl<C> Send for Authenticator<C>
impl<C> Sync for Authenticator<C>
impl<C> Unpin for Authenticator<C>
impl<C> !UnwindSafe for Authenticator<C>
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