From dc0fc53fd3c3f6c32c8b0d063922c7018fa2c48f Mon Sep 17 00:00:00 2001 From: vnugent Date: Mon, 12 Jun 2023 19:04:15 -0400 Subject: Baby steps for autonomous nodes --- plugins/CacheBroker/src/Endpoints/BrokerRegistrationEndpoint.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/CacheBroker/src/Endpoints') diff --git a/plugins/CacheBroker/src/Endpoints/BrokerRegistrationEndpoint.cs b/plugins/CacheBroker/src/Endpoints/BrokerRegistrationEndpoint.cs index db82887..cb22176 100644 --- a/plugins/CacheBroker/src/Endpoints/BrokerRegistrationEndpoint.cs +++ b/plugins/CacheBroker/src/Endpoints/BrokerRegistrationEndpoint.cs @@ -109,18 +109,18 @@ namespace VNLib.Plugins.Cache.Broker.Endpoints private async Task GetClientPublic() { - return await this.GetPlugin().TryGetSecretAsync("client_public_key").ToJsonWebKey() ?? throw new InvalidOperationException("Client public key not found in vault"); + return await this.GetPlugin().GetSecretAsync("client_public_key").ToJsonWebKey(); } private async Task GetCachePublic() { - using SecretResult secret = await this.GetPlugin().TryGetSecretAsync("cache_public_key") ?? throw new InvalidOperationException("Cache public key not found in vault"); + using ISecretResult secret = await this.GetPlugin().GetSecretAsync("cache_public_key"); return secret.GetJsonWebKey(); } private async Task GetBrokerCertificate() { - using SecretResult secret = await this.GetPlugin().TryGetSecretAsync("broker_private_key") ?? throw new InvalidOperationException("Broker private key not found in vault"); + using ISecretResult secret = await this.GetPlugin().TryGetSecretAsync("broker_private_key"); return secret.GetJsonWebKey(); } -- cgit