diff options
author | vnugent <public@vaughnnugent.com> | 2023-06-12 19:04:15 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2023-06-12 19:04:15 -0400 |
commit | dc0fc53fd3c3f6c32c8b0d063922c7018fa2c48f (patch) | |
tree | 92f963014624a1016f6cb645af5afd18278c54c3 /plugins/CacheBroker/src/Endpoints | |
parent | 392b38a40e01f2d4dbd457da122dfaf7a1ffe00f (diff) |
Baby steps for autonomous nodes
Diffstat (limited to 'plugins/CacheBroker/src/Endpoints')
-rw-r--r-- | plugins/CacheBroker/src/Endpoints/BrokerRegistrationEndpoint.cs | 6 |
1 files changed, 3 insertions, 3 deletions
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<ReadOnlyJsonWebKey> 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<ReadOnlyJsonWebKey> 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<ReadOnlyJsonWebKey> 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(); } |