diff options
author | vman <public@vaughnnugent.com> | 2022-12-28 14:19:32 -0500 |
---|---|---|
committer | vman <public@vaughnnugent.com> | 2022-12-28 14:19:32 -0500 |
commit | 9bb5ddd8f19c0ecabd7af4ee58d80c16826bc183 (patch) | |
tree | 7f8a3863d18f4673294ab11e427fe0b77fd70abf /Plugins/SessionCacheServer/ObjectCacheServerEntry.cs | |
parent | 1f2b3530ebeafa162fe4df41e691c33cb2ff0009 (diff) |
Cache provider abstractions, reduced deps
Diffstat (limited to 'Plugins/SessionCacheServer/ObjectCacheServerEntry.cs')
-rw-r--r-- | Plugins/SessionCacheServer/ObjectCacheServerEntry.cs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Plugins/SessionCacheServer/ObjectCacheServerEntry.cs b/Plugins/SessionCacheServer/ObjectCacheServerEntry.cs index 20a6268..85a7996 100644 --- a/Plugins/SessionCacheServer/ObjectCacheServerEntry.cs +++ b/Plugins/SessionCacheServer/ObjectCacheServerEntry.cs @@ -287,14 +287,12 @@ namespace VNLib.Plugins.Essentials.Sessions.Server private async Task<ReadOnlyJsonWebKey> GetCachePrivate() { - using SecretResult secret = await this.TryGetSecretAsync("cache_private_key") ?? throw new KeyNotFoundException("Failed to load the cache private key"); - return secret.GetJsonWebKey(); + return await this.TryGetSecretAsync("cache_private_key").ToJsonWebKey() ?? throw new KeyNotFoundException("Failed to load the cache private key"); } private async Task<ReadOnlyJsonWebKey> GetBrokerPublic() { - using SecretResult secret = await this.TryGetSecretAsync("broker_public_key") ?? throw new KeyNotFoundException("Failed to load the broker's public key"); - return secret.GetJsonWebKey(); + return await this.TryGetSecretAsync("broker_public_key").ToJsonWebKey() ?? throw new KeyNotFoundException("Failed to load the broker's public key"); } |