Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dex
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
dex
Commits
38be227a
Commit
38be227a
authored
Mar 03, 2016
by
Eric Chiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #357 from ericchiang/query_escape
server: url decode basic auth credentials
parents
016445b1
c3aa6a1e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
http.go
server/http.go
+15
-1
No files found.
server/http.go
View file @
38be227a
...
@@ -434,7 +434,21 @@ func handleTokenFunc(srv OIDCServer) http.HandlerFunc {
...
@@ -434,7 +434,21 @@ func handleTokenFunc(srv OIDCServer) http.HandlerFunc {
return
return
}
}
creds
:=
oidc
.
ClientCredentials
{
ID
:
user
,
Secret
:
password
}
decodedUser
,
err
:=
url
.
QueryUnescape
(
user
)
if
err
!=
nil
{
log
.
Errorf
(
"error decoding user: %v"
,
err
)
writeTokenError
(
w
,
oauth2
.
NewError
(
oauth2
.
ErrorInvalidClient
),
state
)
return
}
decodedPassword
,
err
:=
url
.
QueryUnescape
(
password
)
if
err
!=
nil
{
log
.
Errorf
(
"error decoding password: %v"
,
err
)
writeTokenError
(
w
,
oauth2
.
NewError
(
oauth2
.
ErrorInvalidClient
),
state
)
return
}
creds
:=
oidc
.
ClientCredentials
{
ID
:
decodedUser
,
Secret
:
decodedPassword
}
var
jwt
*
jose
.
JWT
var
jwt
*
jose
.
JWT
var
refreshToken
string
var
refreshToken
string
...
...
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