pub trait CredentialProvider: Send + Sync {
// Required method
fn load<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Credentials>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn refresh<'life0, 'life1, 'async_trait>(
&'life0 self,
_credentials: &'life1 Credentials,
) -> Pin<Box<dyn Future<Output = Result<Credentials>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Credential provider trait for dynamic credential loading
Required Methods§
Provided Methods§
Sourcefn refresh<'life0, 'life1, 'async_trait>(
&'life0 self,
_credentials: &'life1 Credentials,
) -> Pin<Box<dyn Future<Output = Result<Credentials>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn refresh<'life0, 'life1, 'async_trait>(
&'life0 self,
_credentials: &'life1 Credentials,
) -> Pin<Box<dyn Future<Output = Result<Credentials>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Refreshes credentials if needed