Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
393459b2
Commit
393459b2
authored
May 14, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve code design after review
parent
4f1e0014
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
app/controllers/jwt_controller.rb
app/controllers/jwt_controller.rb
+2
-5
No files found.
app/controllers/jwt_controller.rb
View file @
393459b2
...
@@ -12,9 +12,8 @@ class JwtController < ApplicationController
...
@@ -12,9 +12,8 @@ class JwtController < ApplicationController
head
:not_found
unless
service
head
:not_found
unless
service
result
=
service
.
new
(
@project
,
@user
,
auth_params
).
execute
result
=
service
.
new
(
@project
,
@user
,
auth_params
).
execute
return
head
result
[
:http_status
]
if
result
[
:http_status
]
render
json:
result
render
json:
result
,
status:
result
[
:http_status
]
end
end
private
private
...
@@ -27,10 +26,8 @@ class JwtController < ApplicationController
...
@@ -27,10 +26,8 @@ class JwtController < ApplicationController
@user
=
authenticate_user
(
login
,
password
)
@user
=
authenticate_user
(
login
,
password
)
return
if
@user
return
if
@user
end
if
ActionController
::
HttpAuthentication
::
Basic
.
has_basic_credentials?
(
request
)
render_403
head
:forbidden
end
end
end
end
...
...
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