diff options
author | Marc Alexander <admin@m-a-styles.de> | 2013-11-27 14:55:05 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2013-11-27 14:55:24 +0100 |
commit | 33f4d267ef9a3b65a1fbda82afa13ecc486b5c80 (patch) | |
tree | 2e19c6d0b72144d50197c01dcc2ad000913553ef /phpBB/phpbb/auth/provider/oauth | |
parent | 0d4bf3ff45a76dcb763c76502944aa7bf78b690b (diff) | |
parent | 125e76f9aa83141534387a965e8373c9b9cd5c4d (diff) | |
download | forums-33f4d267ef9a3b65a1fbda82afa13ecc486b5c80.tar forums-33f4d267ef9a3b65a1fbda82afa13ecc486b5c80.tar.gz forums-33f4d267ef9a3b65a1fbda82afa13ecc486b5c80.tar.bz2 forums-33f4d267ef9a3b65a1fbda82afa13ecc486b5c80.tar.xz forums-33f4d267ef9a3b65a1fbda82afa13ecc486b5c80.zip |
Merge branch 'develop' of https://github.com/phpbb/phpbb3 into ticket/11842
Conflicts:
phpBB/includes/acp/acp_groups.php
Diffstat (limited to 'phpBB/phpbb/auth/provider/oauth')
8 files changed, 8 insertions, 72 deletions
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php index de81ac0d04..2749661269 100644 --- a/phpBB/phpbb/auth/provider/oauth/oauth.php +++ b/phpBB/phpbb/auth/provider/oauth/oauth.php @@ -9,14 +9,6 @@ namespace phpbb\auth\provider\oauth; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - use OAuth\Common\Consumer\Credentials; use OAuth\Common\Http\Uri\Uri; @@ -179,7 +171,7 @@ class oauth extends \phpbb\auth\provider\base $storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table); $query = 'mode=login&login=external&oauth_service=' . $service_name_original; - $service = $this->get_service($service_name_original, $storage, $service_credentials, $this->service_providers[$service_name]->get_auth_scope(), $query); + $service = $this->get_service($service_name_original, $storage, $service_credentials, $query, $this->service_providers[$service_name]->get_auth_scope()); if ($this->request->is_set('code', \phpbb\request\request_interface::GET)) { @@ -273,13 +265,13 @@ class oauth extends \phpbb\auth\provider\base * @param string $service_name The name of the service * @param \phpbb\auth\provider\oauth\token_storage $storage * @param array $service_credentials {@see \phpbb\auth\provider\oauth\oauth::get_service_credentials} - * @param array $scope The scope of the request against - * the api. * @param string $query The query string of the * current_uri used in redirection + * @param array $scope The scope of the request against + * the api. * @return \OAuth\Common\Service\ServiceInterface */ - protected function get_service($service_name, \phpbb\auth\provider\oauth\token_storage $storage, array $service_credentials, array $scopes = array(), $query) + protected function get_service($service_name, \phpbb\auth\provider\oauth\token_storage $storage, array $service_credentials, $query, array $scopes = array()) { $current_uri = $this->get_current_uri($service_name, $query); @@ -458,7 +450,7 @@ class oauth extends \phpbb\auth\provider\base // Prepare for an authentication request $service_credentials = $this->service_providers[$service_name]->get_service_credentials(); $scopes = $this->service_providers[$service_name]->get_auth_scope(); - $service = $this->get_service(strtolower($link_data['oauth_service']), $storage, $service_credentials, $scopes, $query); + $service = $this->get_service(strtolower($link_data['oauth_service']), $storage, $service_credentials, $query, $scopes); $this->service_providers[$service_name]->set_external_service_provider($service); // The user has already authenticated successfully, request to authenticate again @@ -491,7 +483,7 @@ class oauth extends \phpbb\auth\provider\base $query = 'i=ucp_auth_link&mode=auth_link&link=1&oauth_service=' . strtolower($link_data['oauth_service']); $service_credentials = $this->service_providers[$service_name]->get_service_credentials(); $scopes = $this->service_providers[$service_name]->get_auth_scope(); - $service = $this->get_service(strtolower($link_data['oauth_service']), $storage, $service_credentials, $scopes, $query); + $service = $this->get_service(strtolower($link_data['oauth_service']), $storage, $service_credentials, $query, $scopes); if ($this->request->is_set('code', \phpbb\request\request_interface::GET)) { diff --git a/phpBB/phpbb/auth/provider/oauth/service/base.php b/phpBB/phpbb/auth/provider/oauth/service/base.php index 61deb48695..7a144d2f51 100644 --- a/phpBB/phpbb/auth/provider/oauth/service/base.php +++ b/phpBB/phpbb/auth/provider/oauth/service/base.php @@ -10,14 +10,6 @@ namespace phpbb\auth\provider\oauth\service; /** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - -/** * Base OAuth abstract class that all OAuth services should implement * * @package auth diff --git a/phpBB/phpbb/auth/provider/oauth/service/bitly.php b/phpBB/phpbb/auth/provider/oauth/service/bitly.php index 47cf7ee380..b4050033a6 100644 --- a/phpBB/phpbb/auth/provider/oauth/service/bitly.php +++ b/phpBB/phpbb/auth/provider/oauth/service/bitly.php @@ -10,14 +10,6 @@ namespace phpbb\auth\provider\oauth\service; /** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - -/** * Bitly OAuth service * * @package auth diff --git a/phpBB/phpbb/auth/provider/oauth/service/exception.php b/phpBB/phpbb/auth/provider/oauth/service/exception.php index 0c6cba9fb8..3bc93be01e 100644 --- a/phpBB/phpbb/auth/provider/oauth/service/exception.php +++ b/phpBB/phpbb/auth/provider/oauth/service/exception.php @@ -10,14 +10,6 @@ namespace phpbb\auth\provider\oauth\service; /** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - -/** * OAuth service exception class * * @package auth diff --git a/phpBB/phpbb/auth/provider/oauth/service/facebook.php b/phpBB/phpbb/auth/provider/oauth/service/facebook.php index 4a4eeba6d5..2698be8b18 100644 --- a/phpBB/phpbb/auth/provider/oauth/service/facebook.php +++ b/phpBB/phpbb/auth/provider/oauth/service/facebook.php @@ -10,14 +10,6 @@ namespace phpbb\auth\provider\oauth\service; /** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - -/** * Facebook OAuth service * * @package auth diff --git a/phpBB/phpbb/auth/provider/oauth/service/google.php b/phpBB/phpbb/auth/provider/oauth/service/google.php index 2449bbf523..08cb025c2d 100644 --- a/phpBB/phpbb/auth/provider/oauth/service/google.php +++ b/phpBB/phpbb/auth/provider/oauth/service/google.php @@ -10,14 +10,6 @@ namespace phpbb\auth\provider\oauth\service; /** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - -/** * Google OAuth service * * @package auth diff --git a/phpBB/phpbb/auth/provider/oauth/service/service_interface.php b/phpBB/phpbb/auth/provider/oauth/service/service_interface.php index ab69fe6ef3..eee3a51cac 100644 --- a/phpBB/phpbb/auth/provider/oauth/service/service_interface.php +++ b/phpBB/phpbb/auth/provider/oauth/service/service_interface.php @@ -10,14 +10,6 @@ namespace phpbb\auth\provider\oauth\service; /** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - -/** * OAuth service interface * * @package auth diff --git a/phpBB/phpbb/auth/provider/oauth/token_storage.php b/phpBB/phpbb/auth/provider/oauth/token_storage.php index 2ce0e32da3..43574288dc 100644 --- a/phpBB/phpbb/auth/provider/oauth/token_storage.php +++ b/phpBB/phpbb/auth/provider/oauth/token_storage.php @@ -9,14 +9,6 @@ namespace phpbb\auth\provider\oauth; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - use OAuth\OAuth1\Token\StdOAuth1Token; use OAuth\Common\Token\TokenInterface; @@ -78,7 +70,7 @@ class token_storage implements TokenStorageInterface { $service = $this->get_service_name_for_db($service); - if ($this->cachedToken instanceOf TokenInterface) + if ($this->cachedToken instanceof TokenInterface) { return $this->cachedToken; } @@ -238,7 +230,7 @@ class token_storage implements TokenStorageInterface { $service = $this->get_service_name_for_db($service); - if ($this->cachedToken instanceOf TokenInterface) { + if ($this->cachedToken instanceof TokenInterface) { return $this->cachedToken; } |