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
0
Merge Requests
0
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
Jérome Perrin
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
Show 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
head
:not_found
unless
service
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
private
...
...
@@ -27,10 +26,8 @@ class JwtController < ApplicationController
@user
=
authenticate_user
(
login
,
password
)
return
if
@user
end
if
ActionController
::
HttpAuthentication
::
Basic
.
has_basic_credentials?
(
request
)
head
:forbidden
render_403
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