From 07fd394e88bba80b8e483e610fe96cd637474108 Mon Sep 17 00:00:00 2001
From: Paul des Garets <paul.des-garets@student.ecp.fr>
Date: Sun, 25 Jan 2015 15:18:27 +0100
Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20des=20urls?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 app/controllers/redmine_oauth_controller.rb | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/controllers/redmine_oauth_controller.rb b/app/controllers/redmine_oauth_controller.rb
index dfb32cf..9f076b7 100644
--- a/app/controllers/redmine_oauth_controller.rb
+++ b/app/controllers/redmine_oauth_controller.rb
@@ -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
-- 
GitLab