mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-13 04:26:49 +00:00
parent
babc3e4f1a
commit
2787c7fc52
5 changed files with 95 additions and 85 deletions
|
|
@ -11,6 +11,9 @@ namespace PepperDash.Essentials.Core
|
|||
{
|
||||
public static List<ISecretProvider> Secrets { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the SecretsManager
|
||||
/// </summary>
|
||||
public static void Initialize()
|
||||
{
|
||||
Secrets = new List<ISecretProvider> {new CrestronSecretsProvider("default")};
|
||||
|
|
@ -30,6 +33,11 @@ namespace PepperDash.Essentials.Core
|
|||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method to return a ISecretProvider to Set, Get, and Delete Secrets
|
||||
/// </summary>
|
||||
/// <param name="key">Secret Provider Key</param>
|
||||
/// <returns></returns>
|
||||
public static ISecretProvider GetSecretProviderByKey(string key)
|
||||
{
|
||||
var secret = Secrets.FirstOrDefault(o => o.Key == key);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue