Skip to content

Commit

Permalink
Use AddUserSecrets to secure development environments #18
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenkirstaetter committed Apr 1, 2024
1 parent 9ef7c04 commit d93c3db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/Mscc.GenerativeAI.Google/ConfigurationFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public ConfigurationFixture()
.AddJsonFile("appsettings.user.json", optional: true)
.AddJsonFile(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "gcloud", "application_default_credentials.json"), optional: true)
.AddEnvironmentVariables()
.AddUserSecrets<ConfigurationFixture>()
.Build();

ApiKey = Configuration["api_key"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="System.Text.Json" Version="8.0.2" />
<PackageReference Include="xunit" Version="2.7.0" />
Expand Down

0 comments on commit d93c3db

Please sign in to comment.