Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
go-sso
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
id
go-sso
Commits
bef0bea2
Commit
bef0bea2
authored
Oct 29, 2018
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve logging for exchange failures
parent
d3b43e35
Pipeline
#1423
passed with stages
in 1 minute and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
server/http.go
server/http.go
+7
-2
No files found.
server/http.go
View file @
bef0bea2
...
...
@@ -290,8 +290,13 @@ func (h *Server) handleExchange(w http.ResponseWriter, req *http.Request) {
reqGroups
:=
strings
.
Split
(
req
.
FormValue
(
"new_groups"
),
","
)
token
,
err
:=
h
.
loginService
.
Exchange
(
curToken
,
curService
,
curNonce
,
newService
,
newNonce
,
reqGroups
)
if
err
!=
nil
{
log
.
Printf
(
"exchange error: %v"
,
err
)
switch
{
case
err
==
ErrUnauthorized
:
log
.
Printf
(
"unauthorized exchange request (%s -> %s)"
,
curService
,
newService
)
http
.
Error
(
w
,
"Forbidden"
,
http
.
StatusForbidden
)
return
case
err
!=
nil
:
log
.
Printf
(
"exchange error (%s -> %s): %v"
,
curService
,
newService
,
err
)
http
.
Error
(
w
,
err
.
Error
(),
http
.
StatusBadRequest
)
return
}
...
...
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