Trait cloud_storage_lite::token_provider::TokenProvider[][src]

pub trait TokenProvider: Send + Sync {
    #[must_use]
    fn get_token<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Arc<Token>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; #[must_use] fn invalidate_token<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... } }

A TokenProvider is something that, when invoked, gives a valid, unexpired access token.

Required methods

#[must_use]
fn get_token<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<Arc<Token>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Returns new JWT-formatted access token.

Loading content...

Provided methods

#[must_use]
fn invalidate_token<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Marks the current token as invalid, forcing a refresh, if possible.

Loading content...

Implementors

impl TokenProvider for OAuthTokenProvider[src]

impl<T: TokenProvider> TokenProvider for RenewingTokenProvider<T>[src]

Loading content...