Struct yup_oauth2::authenticator::Authenticator  
source · pub struct Authenticator<S> { /* private fields */ }Expand description
Authenticator is responsible for fetching tokens, handling refreshing tokens, and optionally persisting tokens to disk.
Implementations§
source§impl<S> Authenticator<S>
 
impl<S> Authenticator<S>
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<S: Clone> Clone for Authenticator<S>
 
impl<S: Clone> Clone for Authenticator<S>
source§fn clone(&self) -> Authenticator<S>
 
fn clone(&self) -> Authenticator<S>
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<S> !RefUnwindSafe for Authenticator<S>
impl<S> Send for Authenticator<S>
impl<S> Sync for Authenticator<S>
impl<S> Unpin for Authenticator<S>
impl<S> !UnwindSafe for Authenticator<S>
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