aboutsummaryrefslogtreecommitdiff
path: root/plugins/providers
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-07-04 23:55:28 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2024-07-04 23:55:28 -0400
commit754f177da9abecb61b5ccaff5efb203d92aeb581 (patch)
tree1617d6267383e9a434712836dec780f30be2d0ba /plugins/providers
parentf977d561f2ef6353d8f54fbf2466c87cf6456e31 (diff)
push latest development
Diffstat (limited to 'plugins/providers')
-rw-r--r--plugins/providers/VNLib.Plugins.Essentials.Auth.Auth0/src/Auth0Portal.cs2
-rw-r--r--plugins/providers/VNLib.Plugins.Essentials.Auth.Auth0/src/Endpoints/LoginEndpoint.cs5
2 files changed, 3 insertions, 4 deletions
diff --git a/plugins/providers/VNLib.Plugins.Essentials.Auth.Auth0/src/Auth0Portal.cs b/plugins/providers/VNLib.Plugins.Essentials.Auth.Auth0/src/Auth0Portal.cs
index a698806..2f91999 100644
--- a/plugins/providers/VNLib.Plugins.Essentials.Auth.Auth0/src/Auth0Portal.cs
+++ b/plugins/providers/VNLib.Plugins.Essentials.Auth.Auth0/src/Auth0Portal.cs
@@ -30,7 +30,7 @@ using VNLib.Plugins.Essentials.Auth.Auth0.Endpoints;
namespace VNLib.Plugins.Essentials.Auth.Auth0
{
-
+
[ServiceExport]
[ConfigurationName(ConfigKey)]
public sealed class Auth0Portal(PluginBase plugin, IConfigScope config) : IOAuthProvider
diff --git a/plugins/providers/VNLib.Plugins.Essentials.Auth.Auth0/src/Endpoints/LoginEndpoint.cs b/plugins/providers/VNLib.Plugins.Essentials.Auth.Auth0/src/Endpoints/LoginEndpoint.cs
index 52be461..1937aef 100644
--- a/plugins/providers/VNLib.Plugins.Essentials.Auth.Auth0/src/Endpoints/LoginEndpoint.cs
+++ b/plugins/providers/VNLib.Plugins.Essentials.Auth.Auth0/src/Endpoints/LoginEndpoint.cs
@@ -27,7 +27,6 @@ using System.Linq;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
-using System.Collections.Generic;
using RestSharp;
@@ -56,7 +55,7 @@ namespace VNLib.Plugins.Essentials.Auth.Auth0.Endpoints
public LoginEndpoint(PluginBase plugin, IConfigScope config) : base(plugin, config)
{
- string keyUrl = config["key_url"].GetString() ?? throw new KeyNotFoundException("Missing Auth0 'key_url' from config");
+ string keyUrl = config.GetRequiredProperty("key_url", p => p.GetString()!);
//Define the key endpoint
SiteAdapter.DefineSingleEndpoint()
@@ -88,7 +87,7 @@ namespace VNLib.Plugins.Essentials.Auth.Auth0.Endpoints
//Create a new jwk from each key element in the response
ReadOnlyJsonWebKey[] keys = doc.RootElement.GetProperty("keys")
.EnumerateArray()
- .Select(static k => new ReadOnlyJsonWebKey(k))
+ .Select(static k => new ReadOnlyJsonWebKey(in k))
.ToArray();
Log.Debug("Found {count} Auth0 signing keys", keys.Length);