pub trait CredentialsProvider {
type Credentials;
fn acquire_credentials<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Self::Credentials, CredentialsError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn is_expired(&self) -> bool;
}Required Associated Types
type Credentials
Required Methods
fn acquire_credentials<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Self::Credentials, CredentialsError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn acquire_credentials<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Self::Credentials, CredentialsError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Acquire new credentials from the credentials provider.
Calling this method will often result in a network request to an identity provider
fn is_expired(&self) -> bool
fn is_expired(&self) -> bool
Check whether the credentials since the last call to acquire_credentials have expired
This method should not make any network requests to identity providers so may still return true even if a token has been revoked.