aboutsummaryrefslogtreecommitdiff
path: root/Plugins/CacheBroker/Endpoints/BrokerRegistrationEndpoint.cs
diff options
context:
space:
mode:
authorLibravatar vman <public@vaughnnugent.com>2022-12-28 14:19:32 -0500
committerLibravatar vman <public@vaughnnugent.com>2022-12-28 14:19:32 -0500
commit9bb5ddd8f19c0ecabd7af4ee58d80c16826bc183 (patch)
tree7f8a3863d18f4673294ab11e427fe0b77fd70abf /Plugins/CacheBroker/Endpoints/BrokerRegistrationEndpoint.cs
parent1f2b3530ebeafa162fe4df41e691c33cb2ff0009 (diff)
Cache provider abstractions, reduced deps
Diffstat (limited to 'Plugins/CacheBroker/Endpoints/BrokerRegistrationEndpoint.cs')
-rw-r--r--Plugins/CacheBroker/Endpoints/BrokerRegistrationEndpoint.cs5
1 files changed, 1 insertions, 4 deletions
diff --git a/Plugins/CacheBroker/Endpoints/BrokerRegistrationEndpoint.cs b/Plugins/CacheBroker/Endpoints/BrokerRegistrationEndpoint.cs
index be700d1..7867e97 100644
--- a/Plugins/CacheBroker/Endpoints/BrokerRegistrationEndpoint.cs
+++ b/Plugins/CacheBroker/Endpoints/BrokerRegistrationEndpoint.cs
@@ -33,9 +33,7 @@ using System.Threading;
using System.Net.Sockets;
using System.Threading.Tasks;
using System.Collections.Generic;
-using System.Security.Cryptography;
using System.Text.Json.Serialization;
-using System.Security.Cryptography.X509Certificates;
using RestSharp;
@@ -110,8 +108,7 @@ namespace VNLib.Plugins.Cache.Broker.Endpoints
private async Task<ReadOnlyJsonWebKey> GetClientPublic()
{
- using SecretResult secret = await this.GetPlugin().TryGetSecretAsync("client_public_key") ?? throw new InvalidOperationException("Client public key not found in vault");
- return secret.GetJsonWebKey();
+ return await this.GetPlugin().TryGetSecretAsync("client_public_key").ToJsonWebKey() ?? throw new InvalidOperationException("Client public key not found in vault");
}
private async Task<ReadOnlyJsonWebKey> GetCachePublic()