aboutsummaryrefslogtreecommitdiff
path: root/lib/VNLib.Plugins.Extensions.Loading/src
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-03-24 21:17:57 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2024-03-24 21:17:57 -0400
commit6da9d3b34fb0dd61cf8a81290e573e54851fcd07 (patch)
tree8b91e29f749e0425327a42032de314724e29399c /lib/VNLib.Plugins.Extensions.Loading/src
parente54817529c7e302e48d79aaeef0732e5ecd884e9 (diff)
Squashed commit of the following:
commit 0103116bdc79d2ea8cfeba99d78fed976373f0da Author: vnugent <public@vaughnnugent.com> Date: Thu Mar 21 14:36:12 2024 -0400 chore: Update core ReadonlyJWK deserialization commit 2c07ebbbcfdbc0989685de2af85adb0dcf731d30 Author: vnugent <public@vaughnnugent.com> Date: Sun Mar 10 21:58:28 2024 -0400 source tree project location updated commit f0c2f505c80d7bec0d674c67439f3f692d44bca7 Merge: d1c17d8 e548175 Author: vnugent <public@vaughnnugent.com> Date: Sun Mar 10 16:49:17 2024 -0400 Merge remote-tracking branch 'origin/master' into develop commit d1c17d845d55bdb3c8c51b619ca2c6b5393bc08b Author: vnugent <public@vaughnnugent.com> Date: Sat Mar 9 16:30:44 2024 -0500 package updates commit 7a263bf54b7967ddeb9f6b662339ec1c74546ce8 Author: vnugent <public@vaughnnugent.com> Date: Sat Mar 9 14:19:31 2024 -0500 refactor: Overhaul secret loading. Remove VaultSharp as a dep commit 766e179d110db4f955fffce55f2b0ad41c139179 Author: vnugent <public@vaughnnugent.com> Date: Wed Mar 6 21:35:35 2024 -0500 refactor: changed how service constructors are invoked, moved routing
Diffstat (limited to 'lib/VNLib.Plugins.Extensions.Loading/src')
-rw-r--r--lib/VNLib.Plugins.Extensions.Loading/src/Secrets/VaultSecrets.cs8
-rw-r--r--lib/VNLib.Plugins.Extensions.Loading/src/VNLib.Plugins.Extensions.Loading.csproj8
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/VNLib.Plugins.Extensions.Loading/src/Secrets/VaultSecrets.cs b/lib/VNLib.Plugins.Extensions.Loading/src/Secrets/VaultSecrets.cs
index a5ba550..9be74ee 100644
--- a/lib/VNLib.Plugins.Extensions.Loading/src/Secrets/VaultSecrets.cs
+++ b/lib/VNLib.Plugins.Extensions.Loading/src/Secrets/VaultSecrets.cs
@@ -214,7 +214,7 @@ namespace VNLib.Plugins.Extensions.Loading
/// <exception cref="ArgumentNullException"></exception>
public static PrivateKey GetPrivateKey(this ISecretResult secret)
{
- _ = secret ?? throw new ArgumentNullException(nameof(secret));
+ ArgumentNullException.ThrowIfNull(secret);
return new PrivateKey(secret);
}
@@ -228,15 +228,15 @@ namespace VNLib.Plugins.Extensions.Loading
/// <exception cref="ArgumentNullException"></exception>
public static ReadOnlyJsonWebKey GetJsonWebKey(this ISecretResult secret)
{
- _ = secret ?? throw new ArgumentNullException(nameof(secret));
-
+ ArgumentNullException.ThrowIfNull(secret);
+
//Alloc buffer, utf8 so 1 byte per char
using IMemoryHandle<byte> buffer = MemoryUtil.SafeAlloc<byte>(secret.Result.Length);
//Get utf8 bytes
int count = Encoding.UTF8.GetBytes(secret.Result, buffer.Span);
- return new ReadOnlyJsonWebKey(buffer.Span[..count]);
+ return ReadOnlyJsonWebKey.FromUtf8Bytes(buffer.Span[..count]);
}
#nullable disable
diff --git a/lib/VNLib.Plugins.Extensions.Loading/src/VNLib.Plugins.Extensions.Loading.csproj b/lib/VNLib.Plugins.Extensions.Loading/src/VNLib.Plugins.Extensions.Loading.csproj
index 1dfaa30..be21770 100644
--- a/lib/VNLib.Plugins.Extensions.Loading/src/VNLib.Plugins.Extensions.Loading.csproj
+++ b/lib/VNLib.Plugins.Extensions.Loading/src/VNLib.Plugins.Extensions.Loading.csproj
@@ -49,10 +49,10 @@
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\..\..\..\..\core\lib\Utils\src\VNLib.Utils.csproj" />
- <ProjectReference Include="..\..\..\..\..\core\lib\Plugins\src\VNLib.Plugins.csproj" />
- <ProjectReference Include="..\..\..\..\..\core\lib\Plugins.Essentials\src\VNLib.Plugins.Essentials.csproj" />
- <ProjectReference Include="..\..\..\..\..\core\lib\Plugins.PluginBase\src\VNLib.Plugins.PluginBase.csproj" />
+ <ProjectReference Include="..\..\..\..\core\lib\Utils\src\VNLib.Utils.csproj" />
+ <ProjectReference Include="..\..\..\..\core\lib\Plugins\src\VNLib.Plugins.csproj" />
+ <ProjectReference Include="..\..\..\..\core\lib\Plugins.Essentials\src\VNLib.Plugins.Essentials.csproj" />
+ <ProjectReference Include="..\..\..\..\core\lib\Plugins.PluginBase\src\VNLib.Plugins.PluginBase.csproj" />
</ItemGroup>
</Project>