GetSecret

Function GetSecret 

Source
pub fn GetSecret(
    ExtensionIdentifier: String,
    Key: String,
) -> ActionEffect<Arc<dyn SecretProvider>, CommonError, Option<String>>
Expand description

Creates an effect that, when executed, will retrieve a secret from the host’s secure storage (e.g., OS keychain).

It uses the SecretProvider capability from the environment to perform the actual retrieval.

§Parameters

  • ExtensionIdentifier: The ID of the extension that owns the secret.
  • Key: The key of the secret to retrieve.

§Returns

An ActionEffect that resolves with an Option<String>, containing the secret’s value or None if the secret does not exist.