Struct yup_oauth2::authenticator::Authenticator
source · 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§
source§impl<C: Clone> Clone for Authenticator<C>
impl<C: Clone> Clone for Authenticator<C>
source§fn clone(&self) -> Authenticator<C>
fn clone(&self) -> Authenticator<C>
Returns a copy 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<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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)