Skip to main content

CredentialProvider

Trait CredentialProvider 

Source
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§

Source

fn load<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Credentials>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Loads credentials

Provided Methods§

Source

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

Implementors§