mirror of https://github.com/dapr/dotnet-sdk.git
* Remove .NET Core 3.1 support and standardize on .NET 6 Signed-off-by: Yash Nisar <yashnisar@microsoft.com> * Remove support for .NET 5 as well Signed-off-by: Yash Nisar <yashnisar@microsoft.com> --------- Signed-off-by: Yash Nisar <yashnisar@microsoft.com> |
||
---|---|---|
.. | ||
Properties | ||
components | ||
Program.cs | ||
README.md | ||
SecretStoreConfigurationProviderSample.csproj | ||
Startup.cs | ||
secrets.json |
README.md
Dapr secret store configuration provider in ASP.NET Core
Prerequisites
Overview
This document describes how to use the Dapr Secret Store Configuration Provider sample to load Secrets into ASP.NET Core Configuration.
To load secrets into configuration call the AddDaprSecretStore extension method with the name of the Secret Store and a list of secrets descriptors or related metadata.
Using the Dapr Secret Store Configuration Provider ASP.NET Core example
1. Use Dapr to run the application
Use Dapr to run the application:
dapr run --app-id SecretStoreConfigurationProviderSample --components-path ./components/ -- dotnet run
2. Test the application
Run the following command in other terminal:
curl http://localhost:5000/secret
The response should read: "This the way"