1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-16 05:34:01 +02:00

[feature/oauth] Changes due to code review

PHPBB3-11673
This commit is contained in:
Joseph Warner
2013-08-24 22:00:16 -04:00
parent 310caec5d9
commit a8ffbce99f
10 changed files with 62 additions and 67 deletions

View File

@@ -81,10 +81,10 @@ class phpbb_auth_provider_oauth_service_google extends phpbb_auth_provider_oauth
}
// This was a callback request, get the token
$this->service_provider->requestAccessToken( $this->request->variable('code', '') );
$this->service_provider->requestAccessToken($this->request->variable('code', ''));
// Send a request with it
$result = json_decode( $this->service_provider->request('https://www.googleapis.com/oauth2/v1/userinfo'), true );
$result = json_decode($this->service_provider->request('https://www.googleapis.com/oauth2/v1/userinfo'), true);
// Return the unique identifier
return $result['id'];
@@ -101,7 +101,7 @@ class phpbb_auth_provider_oauth_service_google extends phpbb_auth_provider_oauth
}
// Send a request with it
$result = json_decode( $this->service_provider->request('https://www.googleapis.com/oauth2/v1/userinfo'), true );
$result = json_decode($this->service_provider->request('https://www.googleapis.com/oauth2/v1/userinfo'), true);
// Return the unique identifier
return $result['id'];