Package io.micronaut.azure.secretmanager
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.azure.security.keyvault.secrets.SecretClient
secretClient
(@NonNull com.azure.core.credential.TokenCredential tokenCredential, @NonNull AzureKeyVaultConfigurationProperties azureKeyvaultConfigurationProperties) Creates aSecretClient
instance.
-
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 aSecretClient
instance.- Parameters:
tokenCredential
- azure credentialsazureKeyvaultConfigurationProperties
- key vault configuration- Returns:
- an instance using defaults.
-