Class SecretManagerFactory

java.lang.Object
io.micronaut.azure.secretmanager.SecretManagerFactory

@Factory @Requires(property="micronaut.config-client.enabled",value="true",defaultValue="false") @Requires(property="azure.key-vault") public class SecretManagerFactory extends Object
Factory to create Azure Secret client.
Author:
Nemanja Mikic
  • Constructor Details

    • SecretManagerFactory

      public SecretManagerFactory()
  • Method Details

    • secretClient

      @Singleton public com.azure.security.keyvault.secrets.SecretClient secretClient(@NonNull @NonNull com.azure.core.credential.TokenCredential tokenCredential, @NonNull @NonNull AzureKeyVaultConfigurationProperties azureKeyvaultConfigurationProperties)
      Creates a SecretClient instance.
      Parameters:
      tokenCredential - azure credentials
      azureKeyvaultConfigurationProperties - key vault configuration
      Returns:
      an instance using defaults.