pub trait ProvideCredential:
Debug
+ Send
+ Sync
+ Unpin
+ 'static {
type Credential: Send + Sync + Unpin + 'static;
// Required method
fn provide_credential<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
) -> Pin<Box<dyn Future<Output = Result<Option<Self::Credential>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
ProvideCredential is the trait used by signer to load the credential from the environment. ` Service may require different credential to sign the request, for example, AWS require access key and secret key, while Google Cloud Storage require token.
Required Associated Types§
Sourcetype Credential: Send + Sync + Unpin + 'static
type Credential: Send + Sync + Unpin + 'static
Credential returned by this loader.
Typically, it will be a credential.
Required Methods§
Sourcefn provide_credential<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
) -> Pin<Box<dyn Future<Output = Result<Option<Self::Credential>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn provide_credential<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
) -> Pin<Box<dyn Future<Output = Result<Option<Self::Credential>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load signing credential from current env.