Skip to main content

CredentialProvider

Trait CredentialProvider 

Source
pub trait CredentialProvider: Send + Sync {
    // Required method
    fn get_secret_key(&self, access_key_id: &str) -> Result<String, AuthError>;
}
Expand description

Trait for looking up secret access keys by access key ID.

Implementations may back this with a database, configuration file, or any other credential store.

Required Methods§

Source

fn get_secret_key(&self, access_key_id: &str) -> Result<String, AuthError>

Retrieve the secret access key for the given access key ID.

§Errors

Returns AuthError::AccessKeyNotFound if the access key ID is not recognized.

Implementors§