diff options
author | vnugent <public@vaughnnugent.com> | 2024-03-09 19:13:21 -0500 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2024-03-09 19:13:21 -0500 |
commit | 5d4192880654fd6e00e587814169415b42621327 (patch) | |
tree | f35e2e41e346c5067f0195e7b0f7197e9729e940 /plugins/ObjectCacheServer/src/CacheAuthKeyStore.cs | |
parent | a4b3504bb891829074d1efde0433eae010862181 (diff) |
chore: #2 Minor fixes and polish before release
Diffstat (limited to 'plugins/ObjectCacheServer/src/CacheAuthKeyStore.cs')
-rw-r--r-- | plugins/ObjectCacheServer/src/CacheAuthKeyStore.cs | 14 |
1 files changed, 4 insertions, 10 deletions
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<ReadOnlyJsonWebKey> _clientPub; - private readonly IAsyncLazy<ReadOnlyJsonWebKey> _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<ReadOnlyJsonWebKey> _clientPub = plugin.Secrets().GetSecretAsync("client_public_key").ToLazy(r => r.GetJsonWebKey()); + private readonly IAsyncLazy<ReadOnlyJsonWebKey> _cachePriv = plugin.Secrets().GetSecretAsync("cache_private_key").ToLazy(r => r.GetJsonWebKey()); ///<inheritdoc/> public IReadOnlyDictionary<string, string?> GetJwtHeader() |