aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-03-11 22:53:09 -0500
committerLibravatar vnugent <public@vaughnnugent.com>2023-03-11 22:53:09 -0500
commita80b2624749a3d5e52673d57f06807e4f046f374 (patch)
tree40c448a21c4e917fce5ac35b4002ade6797b2208
parent03f3226ea055dca3565bb859437624ef04a236fd (diff)
Concrete AsyncAccessSerializer impl and basline tests
-rw-r--r--plugins/VNLib.Plugins.Essentials.Accounts/src/AccountsEntryPoint.cs29
-rw-r--r--plugins/VNLib.Plugins.Essentials.Accounts/src/MFA/UserMFAExtensions.cs1
2 files changed, 22 insertions, 8 deletions
diff --git a/plugins/VNLib.Plugins.Essentials.Accounts/src/AccountsEntryPoint.cs b/plugins/VNLib.Plugins.Essentials.Accounts/src/AccountsEntryPoint.cs
index 005953f..9c91b69 100644
--- a/plugins/VNLib.Plugins.Essentials.Accounts/src/AccountsEntryPoint.cs
+++ b/plugins/VNLib.Plugins.Essentials.Accounts/src/AccountsEntryPoint.cs
@@ -58,18 +58,33 @@ namespace VNLib.Plugins.Essentials.Accounts
protected override void OnLoad()
{
- //Route endpoints
- this.Route<LoginEndpoint>();
+ //Add optional endpoint routing
- this.Route<LogoutEndpoint>();
+ if (this.HasConfigForType<LoginEndpoint>())
+ {
+ this.Route<LoginEndpoint>();
+ this.Route<LogoutEndpoint>();
+ }
- this.Route<KeepAliveEndpoint>();
+ if (this.HasConfigForType<KeepAliveEndpoint>())
+ {
+ this.Route<KeepAliveEndpoint>();
+ }
- this.Route<ProfileEndpoint>();
+ if (this.HasConfigForType<ProfileEndpoint>())
+ {
+ this.Route<ProfileEndpoint>();
+ }
- this.Route<PasswordChangeEndpoint>();
+ if (this.HasConfigForType<PasswordChangeEndpoint>())
+ {
+ this.Route<PasswordChangeEndpoint>();
+ }
- this.Route<MFAEndpoint>();
+ if (this.HasConfigForType<MFAEndpoint>())
+ {
+ this.Route<MFAEndpoint>();
+ }
//Only export the account security service if the configuration element is defined
if (this.HasConfigForType<AccountSecProvider>())
diff --git a/plugins/VNLib.Plugins.Essentials.Accounts/src/MFA/UserMFAExtensions.cs b/plugins/VNLib.Plugins.Essentials.Accounts/src/MFA/UserMFAExtensions.cs
index f683a89..28eb804 100644
--- a/plugins/VNLib.Plugins.Essentials.Accounts/src/MFA/UserMFAExtensions.cs
+++ b/plugins/VNLib.Plugins.Essentials.Accounts/src/MFA/UserMFAExtensions.cs
@@ -28,7 +28,6 @@ using System.Text.Json;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text.Json.Serialization;
-using System.Diagnostics.CodeAnalysis;
using VNLib.Hashing;
using VNLib.Utils;