Struct yup_oauth2::authenticator::Authenticator[][src]

pub struct Authenticator<C> { /* fields omitted */ }

Authenticator is responsible for fetching tokens, handling refreshing tokens, and optionally persisting tokens to disk.

Implementations

impl<C> Authenticator<C> where
    C: Connect + Clone + Send + Sync + 'static, 
[src]

pub async fn token<'a, T>(
    &'a self,
    scopes: &'a [T]
) -> Result<AccessToken, Error> where
    T: AsRef<str>, 
[src]

Return the current token for the provided scopes.

pub async fn force_refreshed_token<'a, T>(
    &'a self,
    scopes: &'a [T]
) -> Result<AccessToken, Error> where
    T: AsRef<str>, 
[src]

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

impl<C: Clone> Clone for Authenticator<C>[src]

Auto Trait Implementations

impl<C> !RefUnwindSafe for Authenticator<C>

impl<C> Send for Authenticator<C> where
    C: Send + Sync

impl<C> Sync for Authenticator<C> where
    C: Send + Sync

impl<C> Unpin for Authenticator<C>

impl<C> !UnwindSafe for Authenticator<C>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.