Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Commit 4a3dee4

Browse files
committed
#467 Pass context to authentication func
1 parent 7cdb1c3 commit 4a3dee4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Titanium.Web.Proxy/ProxyAuthorizationHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ private async Task<bool> authenticateUserBasic(SessionEventArgsBase session, str
9898

9999
string username = decoded.Substring(0, colonIndex);
100100
string password = decoded.Substring(colonIndex + 1);
101-
bool authenticated = await ProxyBasicAuthenticateFunc(username, password);
101+
bool authenticated = await ProxyBasicAuthenticateFunc(session, username, password);
102102
if (!authenticated)
103103
{
104104
session.WebSession.Response = createAuthentication407Response("Proxy Authentication Invalid");

Titanium.Web.Proxy/ProxyServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ public ExceptionHandler ExceptionFunc
267267
/// Parameters are username and password as provided by client.
268268
/// Should return true for successful authentication.
269269
/// </summary>
270-
public Func<string, string, Task<bool>> ProxyBasicAuthenticateFunc { get; set; }
270+
public Func<SessionEventArgsBase, string, string, Task<bool>> ProxyBasicAuthenticateFunc { get; set; }
271271

272272
/// <summary>
273273
/// A pluggable callback to authenticate clients by scheme instead of requiring basic authentication through ProxyBasicAuthenticateFunc.

0 commit comments

Comments
 (0)