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
0fbe0406
Commit
0fbe0406
authored
Oct 05, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change `/google_api/authorizations/` to `/google_api/auth/`.
parent
2178cd44
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
app/controllers/google_api/authorizations_controller.rb
app/controllers/google_api/authorizations_controller.rb
+1
-1
app/controllers/projects/clusters_controller.rb
app/controllers/projects/clusters_controller.rb
+1
-1
config/routes/google_api.rb
config/routes/google_api.rb
+1
-1
No files found.
app/controllers/google_api/authorizations_controller.rb
View file @
0fbe0406
...
@@ -2,7 +2,7 @@ module GoogleApi
...
@@ -2,7 +2,7 @@ module GoogleApi
class
AuthorizationsController
<
ApplicationController
class
AuthorizationsController
<
ApplicationController
def
callback
def
callback
token
,
expires_at
=
GoogleApi
::
CloudPlatform
::
Client
token
,
expires_at
=
GoogleApi
::
CloudPlatform
::
Client
.
new
(
nil
,
callback_google_api_auth
orizations
_url
)
.
new
(
nil
,
callback_google_api_auth_url
)
.
get_token
(
params
[
:code
])
.
get_token
(
params
[
:code
])
session
[
GoogleApi
::
CloudPlatform
::
Client
.
session_key_for_token
]
=
token
session
[
GoogleApi
::
CloudPlatform
::
Client
.
session_key_for_token
]
=
token
...
...
app/controllers/projects/clusters_controller.rb
View file @
0fbe0406
...
@@ -17,7 +17,7 @@ class Projects::ClustersController < Projects::ApplicationController
...
@@ -17,7 +17,7 @@ class Projects::ClustersController < Projects::ApplicationController
def
login
def
login
begin
begin
@authorize_url
=
GoogleApi
::
CloudPlatform
::
Client
.
new
(
@authorize_url
=
GoogleApi
::
CloudPlatform
::
Client
.
new
(
nil
,
callback_google_api_auth
orizations
_url
,
nil
,
callback_google_api_auth_url
,
state:
namespace_project_clusters_url
.
to_s
).
authorize_url
state:
namespace_project_clusters_url
.
to_s
).
authorize_url
rescue
GoogleApi
::
Auth
::
ConfigMissingError
rescue
GoogleApi
::
Auth
::
ConfigMissingError
# no-op
# no-op
...
...
config/routes/google_api.rb
View file @
0fbe0406
namespace
:google_api
do
namespace
:google_api
do
resource
:auth
orizations
,
only:
[],
controller: :authorizations
do
resource
:auth
,
only:
[],
controller: :authorizations
do
match
:callback
,
via:
[
:get
,
:post
]
match
:callback
,
via:
[
:get
,
:post
]
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