diff options
author | vnugent <public@vaughnnugent.com> | 2023-09-22 12:29:37 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2023-09-22 12:29:37 -0400 |
commit | 3b99863c2bf3e6eabaf8df31c3edf46e11fd82b8 (patch) | |
tree | 1a38cf2fd4e4a7238aa794af6019de1157cb1d44 /plugins/VNLib.Plugins.Essentials.Accounts/src | |
parent | 4dae55cf424bb3b4e1f5f4fe1b853a0aea3b1f14 (diff) |
Structure refactor & unused feature pruning, more http2 prep
Diffstat (limited to 'plugins/VNLib.Plugins.Essentials.Accounts/src')
-rw-r--r-- | plugins/VNLib.Plugins.Essentials.Accounts/src/SecurityProvider/AccountSecProvider.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/VNLib.Plugins.Essentials.Accounts/src/SecurityProvider/AccountSecProvider.cs b/plugins/VNLib.Plugins.Essentials.Accounts/src/SecurityProvider/AccountSecProvider.cs index 688d84d..d948767 100644 --- a/plugins/VNLib.Plugins.Essentials.Accounts/src/SecurityProvider/AccountSecProvider.cs +++ b/plugins/VNLib.Plugins.Essentials.Accounts/src/SecurityProvider/AccountSecProvider.cs @@ -93,7 +93,7 @@ namespace VNLib.Plugins.Essentials.Accounts.SecurityProvider */ ///<inheritdoc/> - public ValueTask<HttpMiddlewareResult> ProcessAsync(HttpEntity entity) + public ValueTask<FileProcessArgs> ProcessAsync(HttpEntity entity) { //Session must be set and web based for checks if (entity.Session.IsSet && entity.Session.SessionType == SessionType.Web) @@ -104,8 +104,7 @@ namespace VNLib.Plugins.Essentials.Accounts.SecurityProvider //If the session stored a user-agent, make sure it matches the connection if (entity.Session.UserAgent != null && !entity.Session.UserAgent.Equals(entity.Server.UserAgent, StringComparison.Ordinal)) { - entity.CloseResponse(System.Net.HttpStatusCode.Forbidden); - return ValueTask.FromResult(HttpMiddlewareResult.Complete); + return ValueTask.FromResult(FileProcessArgs.Deny); } } @@ -116,8 +115,8 @@ namespace VNLib.Plugins.Essentials.Accounts.SecurityProvider } } - //Always continue - return ValueTask.FromResult(HttpMiddlewareResult.Continue); + //Always continue otherwise + return ValueTask.FromResult(FileProcessArgs.Continue); } |