pub trait SecretProvider: Send + Sync {
// Required method
fn get_secret<'life0, 'async_trait>(
&'life0 self,
key: SecretKey,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A source of secrets used by core provider selection and execution.
Implementations should treat missing secrets as None and should not panic.
Note: this is async to support implementations backed by secure storage.
Required Methods§
Sourcefn get_secret<'life0, 'async_trait>(
&'life0 self,
key: SecretKey,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_secret<'life0, 'async_trait>(
&'life0 self,
key: SecretKey,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieve a secret by key.
Implementations should return None if the secret does not exist or is
unavailable.