This file contains 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
public class Startup | |
{ | |
public Startup(IConfiguration configuration) | |
{ | |
Configuration = configuration; | |
} | |
public IConfiguration Configuration { get; } | |
public void ConfigureServices(IServiceCollection services) |
This file contains 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
/// <summary> | |
/// Custom KeyVaultSecretManager that uses a dictionary in the appsettings to map | |
/// keyvault secrets to appsettings. Useful for when seret names change between environments. | |
/// The key part of the dictionary should match the appSetting to override with the secret value. | |
/// The value part ofthe dictionary should be the name of the secret to pull the value from. | |
/// </summary> | |
public class MappedKeyVaultSecretManager : IKeyVaultSecretManager | |
{ | |
private readonly IReadOnlyDictionary<string, string> _mappings; |