aboutsummaryrefslogtreecommitdiff
path: root/plugins/ObjectCacheServer/src/CacheAuthKeyStore.cs
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-03-09 19:13:21 -0500
committerLibravatar vnugent <public@vaughnnugent.com>2024-03-09 19:13:21 -0500
commit5d4192880654fd6e00e587814169415b42621327 (patch)
treef35e2e41e346c5067f0195e7b0f7197e9729e940 /plugins/ObjectCacheServer/src/CacheAuthKeyStore.cs
parenta4b3504bb891829074d1efde0433eae010862181 (diff)
chore: #2 Minor fixes and polish before release
Diffstat (limited to 'plugins/ObjectCacheServer/src/CacheAuthKeyStore.cs')
-rw-r--r--plugins/ObjectCacheServer/src/CacheAuthKeyStore.cs14
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()