Commit ea7ca04f authored by Paul des Garets's avatar Paul des Garets

Update myecp path

parent d7ce4996
Pipeline #1078 skipped
...@@ -19,7 +19,7 @@ class RedmineOauthController < AccountController ...@@ -19,7 +19,7 @@ class RedmineOauthController < AccountController
redirect_to signin_path redirect_to signin_path
else else
token = oauth_client.auth_code.get_token(params[:code], :redirect_uri => oauth_myecp_callback_url, :state => 'okok') token = oauth_client.auth_code.get_token(params[:code], :redirect_uri => oauth_myecp_callback_url, :state => 'okok')
result = token.get('https://my.ecp.fr/m') result = token.get('/api/v1/members/me')
info = JSON.parse(result.body) info = JSON.parse(result.body)
if info if info
allowed_domain = allowed_domain_for?(info["mail"]) allowed_domain = allowed_domain_for?(info["mail"])
......
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