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]
#[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,
Returns new JWT-formatted access token.
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]
#[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,
Marks the current token as invalid, forcing a refresh, if possible.
Implementors
impl TokenProvider for OAuthTokenProvider
[src]
impl TokenProvider for OAuthTokenProvider
[src]impl<T: TokenProvider> TokenProvider for RenewingTokenProvider<T>
[src]
impl<T: TokenProvider> TokenProvider for RenewingTokenProvider<T>
[src]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]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Arc<Token>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn invalidate_token<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,