aboutsummaryrefslogtreecommitdiff
path: root/Plugins/SessionCacheServer/ObjectCacheServerEntry.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Plugins/SessionCacheServer/ObjectCacheServerEntry.cs')
-rw-r--r--Plugins/SessionCacheServer/ObjectCacheServerEntry.cs6
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");
}