mirror of https://github.com/dapr/quickstarts.git
11 lines
395 B
C#
11 lines
395 B
C#
using System;
|
|
using Dapr.Client;
|
|
|
|
const string DAPR_SECRET_STORE = "localsecretstore";
|
|
const string SECRET_NAME = "secret";
|
|
var client = new DaprClientBuilder().Build();
|
|
|
|
// Get secret from a local secret store
|
|
var secret = await client.GetSecretAsync(DAPR_SECRET_STORE, SECRET_NAME);
|
|
var secretValue = string.Join(", ", secret);
|
|
Console.WriteLine($"Fetched Secret: {secretValue}"); |