Class DefaultSecretKeyVaultClient

java.lang.Object
io.micronaut.azure.secretmanager.client.DefaultSecretKeyVaultClient
All Implemented Interfaces:
SecretKeyVaultClient

@Singleton @Requires(classes=com.azure.security.keyvault.secrets.SecretClient.class) public class DefaultSecretKeyVaultClient extends Object implements SecretKeyVaultClient
Default implementation of SecretKeyVaultClient.
Author:
Nemanja Mikic
  • Constructor Details

    • DefaultSecretKeyVaultClient

      public DefaultSecretKeyVaultClient(com.azure.security.keyvault.secrets.SecretClient client)
  • Method Details

    • getSecret

      public com.azure.security.keyvault.secrets.models.KeyVaultSecret getSecret(String secretName)
      Description copied from interface: SecretKeyVaultClient
      Fetches a secret from the key vault using name of the secret.
      Specified by:
      getSecret in interface SecretKeyVaultClient
      Parameters:
      secretName - - name of the secret
      Returns:
      String value of the secret or empty
    • listSecrets

      public List<com.azure.security.keyvault.secrets.models.KeyVaultSecret> listSecrets()
      Description copied from interface: SecretKeyVaultClient
      Fetches all secrets from the key vault.
      Specified by:
      listSecrets in interface SecretKeyVaultClient
      Returns:
      List of all secrets from key vault