pub trait CredentialProvider:
Debug
+ Send
+ Sync {
type Credential;
// Required method
fn get_credential<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Arc<Self::Credential>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Provides credentials for use when signing requests.
Implementors are responsible for fetching, refreshing, and returning a
credential of an associated type (e.g. an AWS SigV4 key set, an Azure bearer
token, or a GCP service-account token). The cloud-client crate ships
ready-made implementations for every supported provider; see the per-cloud
credential modules for details.
Required Associated Types§
Sourcetype Credential
type Credential
The type of credential returned by this provider
Required Methods§
Sourcefn get_credential<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Arc<Self::Credential>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_credential<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Arc<Self::Credential>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return a credential
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".