From 5d4192880654fd6e00e587814169415b42621327 Mon Sep 17 00:00:00 2001 From: vnugent Date: Sat, 9 Mar 2024 19:13:21 -0500 Subject: chore: #2 Minor fixes and polish before release --- plugins/ObjectCacheServer/src/CacheAuthKeyStore.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'plugins/ObjectCacheServer/src/CacheAuthKeyStore.cs') diff --git a/plugins/ObjectCacheServer/src/CacheAuthKeyStore.cs b/plugins/ObjectCacheServer/src/CacheAuthKeyStore.cs index 5fc700b..5be0776 100644 --- a/plugins/ObjectCacheServer/src/CacheAuthKeyStore.cs +++ b/plugins/ObjectCacheServer/src/CacheAuthKeyStore.cs @@ -1,5 +1,5 @@ /* -* Copyright (c) 2023 Vaughn Nugent +* Copyright (c) 2024 Vaughn Nugent * * Library: VNLib * Package: ObjectCacheServer @@ -34,16 +34,10 @@ using VNLib.Data.Caching.Extensions; namespace VNLib.Data.Caching.ObjectCache.Server { - sealed record class CacheAuthKeyStore : ICacheAuthManager + sealed class CacheAuthKeyStore(PluginBase plugin) : ICacheAuthManager { - private readonly IAsyncLazy _clientPub; - private readonly IAsyncLazy _cachePriv; - - public CacheAuthKeyStore(PluginBase plugin) - { - _clientPub = plugin.GetSecretAsync("client_public_key").ToLazy(r => r.GetJsonWebKey()); - _cachePriv = plugin.GetSecretAsync("cache_private_key").ToLazy(r => r.GetJsonWebKey()); - } + private readonly IAsyncLazy _clientPub = plugin.Secrets().GetSecretAsync("client_public_key").ToLazy(r => r.GetJsonWebKey()); + private readonly IAsyncLazy _cachePriv = plugin.Secrets().GetSecretAsync("cache_private_key").ToLazy(r => r.GetJsonWebKey()); /// public IReadOnlyDictionary GetJwtHeader() -- cgit