aboutsummaryrefslogtreecommitdiff
path: root/lib/VNLib.Plugins.Extensions.Loading/src/VaultSecrets.cs
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-01-27 21:13:17 -0500
committerLibravatar vnugent <public@vaughnnugent.com>2023-01-27 21:13:17 -0500
commit282aad617b9c39a6f14c1cf527f6dd4523d0c54b (patch)
treed2942722aad3c2fb087f8639a5fc667f6767456c /lib/VNLib.Plugins.Extensions.Loading/src/VaultSecrets.cs
parent94ee5cc9090b40fe042187362acd18c0995866f4 (diff)
Object cache overhaul and logger updates
Diffstat (limited to 'lib/VNLib.Plugins.Extensions.Loading/src/VaultSecrets.cs')
-rw-r--r--lib/VNLib.Plugins.Extensions.Loading/src/VaultSecrets.cs2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/VNLib.Plugins.Extensions.Loading/src/VaultSecrets.cs b/lib/VNLib.Plugins.Extensions.Loading/src/VaultSecrets.cs
index d3bdf42..da6650a 100644
--- a/lib/VNLib.Plugins.Extensions.Loading/src/VaultSecrets.cs
+++ b/lib/VNLib.Plugins.Extensions.Loading/src/VaultSecrets.cs
@@ -78,6 +78,7 @@ namespace VNLib.Plugins.Extensions.Loading
/// <exception cref="ObjectDisposedException"></exception>
public static Task<SecretResult?> TryGetSecretAsync(this PluginBase plugin, string secretName)
{
+ plugin.ThrowIfUnloaded();
//Get the secret from the config file raw
string? rawSecret = TryGetSecretInternal(plugin, secretName);
if (rawSecret == null)
@@ -159,6 +160,7 @@ namespace VNLib.Plugins.Extensions.Loading
/// <exception cref="ObjectDisposedException"></exception>
public static Task<X509Certificate?> TryGetCertificateAsync(this PluginBase plugin, string secretName)
{
+ plugin.ThrowIfUnloaded();
//Get the secret from the config file raw
string? rawSecret = TryGetSecretInternal(plugin, secretName);
if (rawSecret == null)