pub trait TokenCredential: Send + Sync + Debug {
    // Required methods
    fn get_token<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        scopes: &'life1 [&'life2 str]
    ) -> Pin<Box<dyn Future<Output = Result<AccessToken>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn clear_cache<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Represents a credential capable of providing an OAuth token.

Required Methods§

source

fn get_token<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, scopes: &'life1 [&'life2 str] ) -> Pin<Box<dyn Future<Output = Result<AccessToken>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Gets a AccessToken for the specified resource

source

fn clear_cache<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Clear the credential’s cache.

Implementors§