Skip to main content

CredentialProvider

Trait CredentialProvider 

Source
pub trait CredentialProvider: Send + Sync {
    // Required methods
    fn resolve<'life0, 'life1, 'async_trait>(
        &'life0 self,
        reference: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<SecretString, CredentialError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn list_refs<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<CredentialRef>, CredentialError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A provider capable of resolving credential references to their secret values.

Resolved values are returned as SecretString to ensure they are zeroized on drop and never accidentally logged via Debug or Display.

Required Methods§

Source

fn resolve<'life0, 'life1, 'async_trait>( &'life0 self, reference: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<SecretString, CredentialError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Resolve a reference name to the corresponding secret value.

Source

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

List all credential references available from this provider.

Implementors§