Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Titanium-Web-Proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Titanium-Web-Proxy
Commits
88c27e0b
Commit
88c27e0b
authored
Jul 15, 2018
by
justcoding121
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#467 Pass context to authentication func
parent
f74c4a9f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
ProxyAuthorizationHandler.cs
Titanium.Web.Proxy/ProxyAuthorizationHandler.cs
+1
-1
ProxyServer.cs
Titanium.Web.Proxy/ProxyServer.cs
+1
-1
No files found.
Titanium.Web.Proxy/ProxyAuthorizationHandler.cs
View file @
88c27e0b
...
...
@@ -98,7 +98,7 @@ namespace Titanium.Web.Proxy
string
username
=
decoded
.
Substring
(
0
,
colonIndex
);
string
password
=
decoded
.
Substring
(
colonIndex
+
1
);
bool
authenticated
=
await
ProxyBasicAuthenticateFunc
(
username
,
password
);
bool
authenticated
=
await
ProxyBasicAuthenticateFunc
(
session
,
username
,
password
);
if
(!
authenticated
)
{
session
.
WebSession
.
Response
=
createAuthentication407Response
(
"Proxy Authentication Invalid"
);
...
...
Titanium.Web.Proxy/ProxyServer.cs
View file @
88c27e0b
...
...
@@ -267,7 +267,7 @@ namespace Titanium.Web.Proxy
/// Parameters are username and password as provided by client.
/// Should return true for successful authentication.
/// </summary>
public
Func
<
string
,
string
,
Task
<
bool
>>
ProxyBasicAuthenticateFunc
{
get
;
set
;
}
public
Func
<
SessionEventArgsBase
,
string
,
string
,
Task
<
bool
>>
ProxyBasicAuthenticateFunc
{
get
;
set
;
}
/// <summary>
/// A pluggable callback to authenticate clients by scheme instead of requiring basic authentication through ProxyBasicAuthenticateFunc.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment