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
2bfb116c
Commit
2bfb116c
authored
May 23, 2017
by
justcoding121
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize
parent
5d996f6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
WinAuthHandler.cs
Titanium.Web.Proxy/WinAuthHandler.cs
+3
-3
No files found.
Titanium.Web.Proxy/WinAuthHandler.cs
View file @
2bfb116c
...
...
@@ -5,7 +5,6 @@ using System.Threading.Tasks;
using
Titanium.Web.Proxy.EventArguments
;
using
Titanium.Web.Proxy.Models
;
using
Titanium.Web.Proxy.Network.WinAuth
;
using
Titanium.Web.Proxy.Extensions
;
namespace
Titanium.Web.Proxy
{
...
...
@@ -58,7 +57,7 @@ namespace Titanium.Web.Proxy
{
authHeader
=
args
.
WebSession
.
Response
.
NonUniqueResponseHeaders
[
headerName
]
.
Where
(
x
=>
authSchemes
.
Any
(
y
=>
x
.
Value
.
ContainsIgnoreCase
(
y
)))
.
Where
(
x
=>
authSchemes
.
Any
(
y
=>
x
.
Value
.
StartsWith
(
y
,
StringComparison
.
OrdinalIgnoreCase
)))
.
FirstOrDefault
();
}
...
...
@@ -79,7 +78,7 @@ namespace Titanium.Web.Proxy
if
(
headerName
!=
null
)
{
authHeader
=
authSchemes
.
Any
(
x
=>
args
.
WebSession
.
Response
.
ResponseHeaders
[
headerName
].
Value
.
ContainsIgnoreCase
(
x
))
?
.
ResponseHeaders
[
headerName
].
Value
.
StartsWith
(
x
,
StringComparison
.
OrdinalIgnoreCase
))
?
args
.
WebSession
.
Response
.
ResponseHeaders
[
headerName
]
:
null
;
}
}
...
...
@@ -102,6 +101,7 @@ namespace Titanium.Web.Proxy
var
serverToken
=
authHeader
.
Value
.
Substring
(
scheme
.
Length
+
1
);
var
clientToken
=
WinAuthHandler
.
GetFinalAuthToken
(
args
.
WebSession
.
Request
.
Host
,
serverToken
,
args
.
Id
);
args
.
WebSession
.
Request
.
RequestHeaders
[
"Authorization"
]
=
new
HttpHeader
(
"Authorization"
,
string
.
Concat
(
scheme
,
clientToken
));
}
...
...
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