Commit 07fd394e authored by Paul des Garets's avatar Paul des Garets

Mise à jour des urls

parent 6b2deedb
......@@ -19,7 +19,7 @@ class RedmineOauthController < AccountController
redirect_to signin_path
else
token = oauth_client.auth_code.get_token(params[:code], :redirect_uri => oauth_google_callback_url)
result = token.get('https://www.googleapis.com/oauth2/v1/userinfo')
result = token.get('https://dev.my.ecp.fr/testapi/who')
info = JSON.parse(result.body)
if info && info["verified_email"]
if allowed_domain_for?(info["email"])
......@@ -84,9 +84,9 @@ class RedmineOauthController < AccountController
def oauth_client
@client ||= OAuth2::Client.new(settings[:client_id], settings[:client_secret],
:site => 'https://accounts.google.com',
:authorize_url => '/o/oauth2/auth',
:token_url => '/o/oauth2/token')
:site => 'https://dev.my.ecp.fr',
:authorize_url => '/oauth/v2/auth',
:token_url => '/oauth/v2/token')
end
def settings
......@@ -94,6 +94,6 @@ class RedmineOauthController < AccountController
end
def scopes
'https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile'
'default_scope'
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