aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/auth/provider/oauth/oauth.php
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-07-23 21:07:04 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-07-23 21:07:18 -0400
commitc166801fe3f7a76484eee870aac19294d192c84c (patch)
treec66de8e39bb53478af7617aa3f982137f828ed70 /phpBB/phpbb/auth/provider/oauth/oauth.php
parentb1938576f15a43c8bf2967ab38f4484a07cc0344 (diff)
downloadforums-c166801fe3f7a76484eee870aac19294d192c84c.tar
forums-c166801fe3f7a76484eee870aac19294d192c84c.tar.gz
forums-c166801fe3f7a76484eee870aac19294d192c84c.tar.bz2
forums-c166801fe3f7a76484eee870aac19294d192c84c.tar.xz
forums-c166801fe3f7a76484eee870aac19294d192c84c.zip
[feature/oauth] Remove temporary google testing code
PHPBB3-11673
Diffstat (limited to 'phpBB/phpbb/auth/provider/oauth/oauth.php')
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index 3ffdcd4b00..c6f7dc223e 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -206,9 +206,10 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
* Returns the cached current_uri object or creates and caches it if it is
* not already created
*
+ * @param string $service_name The name of the service
* @return \OAuth\Common\Http\Uri\UriInterface
*/
- protected function get_current_uri()
+ protected function get_current_uri($service_name)
{
if ($this->current_uri)
{
@@ -217,7 +218,7 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
$uri_factory = new \OAuth\Common\Http\Uri\UriFactory();
$current_uri = $uri_factory->createFromSuperGlobalArray($this->request->get_super_global(phpbb_request_interface::SERVER));
- $current_uri->setQuery('?mode=login&login=external&oauth_service=google');
+ $current_uri->setQuery('mode=login&login=external&oauth_service=' . $service_name);
$this->current_uri = $current_uri;
return $current_uri;
@@ -235,7 +236,7 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
*/
protected function get_service($service_name, phpbb_auth_provider_oauth_token_storage $storage, array $service_credentials, array $scopes = array())
{
- $current_uri = $this->get_current_uri();
+ $current_uri = $this->get_current_uri($service_name);
// Setup the credentials for the requests
$credentials = new Credentials(