Commit 0fbe0406 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Change `/google_api/authorizations/` to `/google_api/auth/`.

parent 2178cd44
...@@ -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_authorizations_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
......
...@@ -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_authorizations_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
......
namespace :google_api do namespace :google_api do
resource :authorizations, only: [], controller: :authorizations do resource :auth, only: [], controller: :authorizations do
match :callback, via: [:get, :post] match :callback, via: [:get, :post]
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment