Created
August 29, 2019 10:12
-
-
Save nikneem/1ffc318389ba0b595364b2df7e5f3ef4 to your computer and use it in GitHub Desktop.
Add Azure Key Vault to ASP.NET
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var azureServiceTokenProvider = new AzureServiceTokenProvider(); | |
var keyVaultClient = new KeyVaultClient( | |
new KeyVaultClient.AuthenticationCallback( | |
azureServiceTokenProvider.KeyVaultTokenCallback)); | |
config.AddAzureKeyVault( | |
$"https://{yourvaultname}.vault.azure.net/", | |
keyVaultClient, | |
new DefaultKeyVaultSecretManager()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment