diff options
author | vman <public@vaughnnugent.com> | 2022-11-04 22:12:55 -0400 |
---|---|---|
committer | vman <public@vaughnnugent.com> | 2022-11-04 22:12:55 -0400 |
commit | fdb055f4687c59c5bd0859388dace05766f7ce06 (patch) | |
tree | 1e98a250a0034622aa469beed9f5957cf5765b55 /Plugins/CacheBroker/Endpoints | |
parent | 62203d58bd9a213e613e59841ded5d3007e294d1 (diff) |
Jwt/jwk support, runtime provider updates
Diffstat (limited to 'Plugins/CacheBroker/Endpoints')
-rw-r--r-- | Plugins/CacheBroker/Endpoints/BrokerRegistrationEndpoint.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Plugins/CacheBroker/Endpoints/BrokerRegistrationEndpoint.cs b/Plugins/CacheBroker/Endpoints/BrokerRegistrationEndpoint.cs index cdc0dc1..06ebfc3 100644 --- a/Plugins/CacheBroker/Endpoints/BrokerRegistrationEndpoint.cs +++ b/Plugins/CacheBroker/Endpoints/BrokerRegistrationEndpoint.cs @@ -22,13 +22,13 @@ using VNLib.Utils.Logging; using VNLib.Utils.Extensions; using VNLib.Hashing.IdentityUtility; using VNLib.Plugins.Essentials; +using VNLib.Plugins.Essentials.Endpoints; using VNLib.Plugins.Essentials.Extensions; using VNLib.Plugins.Extensions.Loading; using VNLib.Plugins.Extensions.Loading.Events; using VNLib.Plugins.Extensions.Loading.Configuration; using VNLib.Net.Rest.Client; - #nullable enable namespace VNLib.Plugins.Cache.Broker.Endpoints @@ -188,7 +188,7 @@ namespace VNLib.Plugins.Cache.Broker.Endpoints //Copy input stream to buffer await inputStream.CopyToAsync(buffer, 4096, Memory.Shared); //Parse jwt - return JsonWebToken.Parse(buffer.AsSpan()); + return JsonWebToken.ParseRaw(buffer.AsSpan()); } protected override async ValueTask<VfReturnType> PutAsync(HttpEntity entity) @@ -200,7 +200,7 @@ namespace VNLib.Plugins.Cache.Broker.Endpoints { alg.ImportSubjectPublicKeyInfo(CachePubKey.Result, out _); //Verify the jwt - if (!jwt.Verify(alg, SignatureHashAlg)) + if (!jwt.Verify(alg, in SignatureHashAlg)) { entity.CloseResponse(HttpStatusCode.Unauthorized); return VfReturnType.VirtualSkip; |