Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
tank
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
tank
Commits
63bce4d6
Commit
63bce4d6
authored
5 years ago
by
Christian Pointner
Browse files
Options
Downloads
Patches
Plain Diff
some more refactoring
parent
e173a2fc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
auth/auth.go
+12
-9
12 additions, 9 deletions
auth/auth.go
with
12 additions
and
9 deletions
auth/auth.go
+
12
−
9
View file @
63bce4d6
...
...
@@ -164,11 +164,11 @@ func listBackends(c *gin.Context) {
}
func
disabled
(
c
*
gin
.
Context
)
{
code
:=
http
.
StatusBadRequest
if
c
.
Param
(
"path"
)
==
"/backends"
{
c
.
JSON
(
http
.
StatusNotFound
,
HTTPErrorResponse
{
"authentication is disabled"
})
return
code
=
http
.
StatusNotFound
}
c
.
JSON
(
http
.
StatusBadRequest
,
HTTPErrorResponse
{
"authentication is disabled"
})
c
.
JSON
(
code
,
HTTPErrorResponse
{
"authentication is disabled"
})
}
func
InstallHTTPHandler
(
r
*
gin
.
RouterGroup
)
{
...
...
@@ -177,15 +177,18 @@ func InstallHTTPHandler(r *gin.RouterGroup) {
return
}
r
.
GET
(
"/backends"
,
listBackends
)
backends
:=
r
.
Group
(
"/backends"
)
backends
.
GET
(
""
,
listBackends
)
r
.
POST
(
"/session"
,
newSession
)
r
.
GET
(
"/session"
,
getSession
)
r
.
DELETE
(
"/session"
,
deleteSession
)
session
:=
r
.
Group
(
"/session"
)
session
.
POST
(
""
,
newSession
)
session
.
GET
(
""
,
getSession
)
session
.
DELETE
(
""
,
deleteSession
)
if
auth
.
oidc
!=
nil
{
r
.
GET
(
"/oidc/login"
,
auth
.
oidc
.
Login
)
r
.
GET
(
"/oidc/callback"
,
auth
.
oidc
.
Callback
)
oidc
:=
r
.
Group
(
"/oidc"
)
oidc
.
GET
(
"login"
,
auth
.
oidc
.
Login
)
oidc
.
GET
(
"callback"
,
auth
.
oidc
.
Callback
)
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment