Skip to content

Commit 8c28458

Browse files
committed
Testing out integration with Azure Key Vault
1 parent 1c4209a commit 8c28458

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Startup.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ public Startup(IHostingEnvironment env)
2222
{
2323
builder.AddUserSecrets<Startup>();
2424
}
25-
25+
else
26+
{
27+
var config = builder.Build();
28+
builder.AddAzureKeyVault("https://weatherchecker.vault.azure.net/", config["ClientId"], config["ClientSecret"]);
29+
}
30+
2631
Configuration = builder.Build();
2732
}
2833

WeatherStation.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.1.2" />
2323
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.1.2" />
2424
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.2" />
25+
<PackageReference Include="Microsoft.Extensions.Configuration.AzureKeyVault" Version="1.0.2" />
2526
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.1.2" />
2627
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.2" />
2728
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="1.1.2" />
@@ -39,6 +40,7 @@
3940

4041
<ItemGroup>
4142
<Folder Include="wwwroot\dist\" />
43+
<Folder Include="wwwroot\dist\" />
4244
</ItemGroup>
4345
<Target Name="RunWebpack" AfterTargets="ComputeFilesToPublish">
4446
<!-- As part of publishing, ensure the JS resources are freshly built in production mode -->

0 commit comments

Comments
 (0)