VaultHelper
The VaultHelper function helps you fetch the KeyVault details for an application. The IVaultHelper instance returned when GetVaultHelper() is called fetches KeyVault values using the following method:
Method
Task<Dictionary<string, object>> GetValue(string AppName);
Example
var vaultHelper = GetVaultHelper(); var logHelper = GetLogHelper(); var vault = await vaultHelper.GetValue("MyApp"); logHelper.LogDebug(vault["AppKey"]); logHelper.LogDebug(vault["AppSecrets"]);
Console Output
"Your_Key" "Your_Secrets"
To set and update value in vault
Using the Vault API, you can set and update value in vault, which is stored in encrypted format. You cannot retrieve vault value using any API. You can retrieve vault values only using the VaultHelper function.