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
33d52209
Commit
33d52209
authored
May 21, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed specs
parent
5475a96c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
8 deletions
+3
-8
app/controllers/sessions_controller.rb
app/controllers/sessions_controller.rb
+1
-1
app/services/oauth2/logout_token_validation_service.rb
app/services/oauth2/logout_token_validation_service.rb
+1
-1
spec/controllers/oauth/geo_auth_controller_spec.rb
spec/controllers/oauth/geo_auth_controller_spec.rb
+1
-1
spec/services/oauth2/logout_token_validation_service_spec.rb
spec/services/oauth2/logout_token_validation_service_spec.rb
+0
-5
No files found.
app/controllers/sessions_controller.rb
View file @
33d52209
...
...
@@ -114,7 +114,7 @@ class SessionsController < Devise::SessionsController
def
gitlab_geo_login
return
unless
Gitlab
::
Geo
.
secondary?
return
if
signed_in?
oauth
=
Gitlab
::
Geo
::
OauthSession
.
new
# share full url with primary node by oauth state
...
...
app/services/oauth2/logout_token_validation_service.rb
View file @
33d52209
...
...
@@ -24,7 +24,7 @@ module Oauth2
def
access_token
@access_token
||=
begin
return
unless
params
[
:state
]
&&
!
params
[
:state
].
empty?
return
unless
params
[
:state
]
&&
!
params
[
:state
].
empty?
oauth_session
=
Gitlab
::
Geo
::
OauthSession
.
new
(
state:
params
[
:state
])
...
...
spec/controllers/oauth/geo_auth_controller_spec.rb
View file @
33d52209
...
...
@@ -81,7 +81,7 @@ describe Oauth::GeoAuthController do
get
:callback
,
state:
callback_state
expect
(
response
.
code
).
to
eq
'200'
expect
(
response
.
body
).
to
include
(
'Your account m
ust
have been deleted'
)
expect
(
response
.
body
).
to
include
(
'Your account m
ay
have been deleted'
)
end
end
end
...
...
spec/services/oauth2/logout_token_validation_service_spec.rb
View file @
33d52209
...
...
@@ -6,11 +6,6 @@ describe Oauth2::LogoutTokenValidationService, services: true do
let
(
:logout_state
)
{
Gitlab
::
Geo
::
OauthSession
.
new
(
access_token:
access_token
).
generate_logout_state
}
context
'#execute'
do
it
'returns error when params are nil'
do
result
=
described_class
.
new
(
user
,
nil
).
execute
expect
(
result
[
:status
]).
to
eq
(
:error
)
end
it
'return error when params are empty'
do
result
=
described_class
.
new
(
user
,
{}).
execute
expect
(
result
[
:status
]).
to
eq
(
:error
)
...
...
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