cleanup unused method
This commit is contained in:
parent
286971e60c
commit
746d67ff9a
@ -71,24 +71,3 @@ finally
|
|||||||
{
|
{
|
||||||
Serilog.Log.CloseAndFlush();
|
Serilog.Log.CloseAndFlush();
|
||||||
}
|
}
|
||||||
|
|
||||||
IConfiguration GetConfiguration()
|
|
||||||
{
|
|
||||||
var builder = new ConfigurationBuilder()
|
|
||||||
.SetBasePath(Directory.GetCurrentDirectory())
|
|
||||||
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
|
||||||
.AddEnvironmentVariables();
|
|
||||||
|
|
||||||
var config = builder.Build();
|
|
||||||
|
|
||||||
if (config.GetValue<bool>("UseVault", false))
|
|
||||||
{
|
|
||||||
TokenCredential credential = new ClientSecretCredential(
|
|
||||||
config["Vault:TenantId"],
|
|
||||||
config["Vault:ClientId"],
|
|
||||||
config["Vault:ClientSecret"]);
|
|
||||||
builder.AddAzureKeyVault(new Uri($"https://{config["Vault:Name"]}.vault.azure.net/"), credential);
|
|
||||||
}
|
|
||||||
|
|
||||||
return builder.Build();
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user