diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/VNLib.Plugins.Essentials.Accounts/src/AccountsEntryPoint.cs | 29 | ||||
-rw-r--r-- | plugins/VNLib.Plugins.Essentials.Accounts/src/MFA/UserMFAExtensions.cs | 1 |
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; |