[ticket/12715] Cleanup comments in \phpbb\auth\provider\*

PHPBB3-12715
This commit is contained in:
Tristan Darricau 2014-06-14 16:42:49 +02:00
parent 3a96c5b753
commit d7b9e33b94
6 changed files with 16 additions and 17 deletions

View file

@ -14,7 +14,6 @@
namespace phpbb\auth\provider\oauth; namespace phpbb\auth\provider\oauth;
use OAuth\Common\Consumer\Credentials; use OAuth\Common\Consumer\Credentials;
use OAuth\Common\Http\Uri\Uri;
/** /**
* OAuth authentication provider for phpBB3 * OAuth authentication provider for phpBB3
@ -224,7 +223,7 @@ class oauth extends \phpbb\auth\provider\base
if (!$row) if (!$row)
{ {
throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_ENTRY'); throw new \Exception('AUTH_PROVIDER_OAUTH_ERROR_INVALID_ENTRY');
} }
// Update token storage to store the user_id // Update token storage to store the user_id
@ -278,9 +277,10 @@ class oauth extends \phpbb\auth\provider\base
* @param array $service_credentials {@see \phpbb\auth\provider\oauth\oauth::get_service_credentials} * @param array $service_credentials {@see \phpbb\auth\provider\oauth\oauth::get_service_credentials}
* @param string $query The query string of the * @param string $query The query string of the
* current_uri used in redirection * current_uri used in redirection
* @param array $scope The scope of the request against * @param array $scopes The scope of the request against
* the api. * the api.
* @return \OAuth\Common\Service\ServiceInterface * @return \OAuth\Common\Service\ServiceInterface
* @throws \Exception
*/ */
protected function get_service($service_name, \phpbb\auth\provider\oauth\token_storage $storage, array $service_credentials, $query, array $scopes = array()) protected function get_service($service_name, \phpbb\auth\provider\oauth\token_storage $storage, array $service_credentials, $query, array $scopes = array())
{ {
@ -298,7 +298,7 @@ class oauth extends \phpbb\auth\provider\base
if (!$service) if (!$service)
{ {
throw new Exception('AUTH_PROVIDER_OAUTH_ERROR_SERVICE_NOT_CREATED'); throw new \Exception('AUTH_PROVIDER_OAUTH_ERROR_SERVICE_NOT_CREATED');
} }
return $service; return $service;
@ -617,7 +617,5 @@ class oauth extends \phpbb\auth\provider\base
$service_name = 'auth.provider.oauth.service.' . strtolower($link_data['oauth_service']); $service_name = 'auth.provider.oauth.service.' . strtolower($link_data['oauth_service']);
$storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table); $storage = new \phpbb\auth\provider\oauth\token_storage($this->db, $this->user, $this->auth_provider_oauth_token_storage_table);
$storage->clearToken($service_name); $storage->clearToken($service_name);
return;
} }
} }

View file

@ -21,22 +21,22 @@ class facebook extends base
/** /**
* phpBB config * phpBB config
* *
* @var phpbb\config\config * @var \phpbb\config\config
*/ */
protected $config; protected $config;
/** /**
* phpBB request * phpBB request
* *
* @var phpbb\request\request_interface * @var \phpbb\request\request_interface
*/ */
protected $request; protected $request;
/** /**
* Constructor * Constructor
* *
* @param phpbb\config\config $config * @param \phpbb\config\config $config
* @param phpbb\request\request_interface $request * @param \phpbb\request\request_interface $request
*/ */
public function __construct(\phpbb\config\config $config, \phpbb\request\request_interface $request) public function __construct(\phpbb\config\config $config, \phpbb\request\request_interface $request)
{ {

View file

@ -21,22 +21,22 @@ class google extends base
/** /**
* phpBB config * phpBB config
* *
* @var phpbb\config\config * @var \phpbb\config\config
*/ */
protected $config; protected $config;
/** /**
* phpBB request * phpBB request
* *
* @var phpbb\request\request_interface * @var \phpbb\request\request_interface
*/ */
protected $request; protected $request;
/** /**
* Constructor * Constructor
* *
* @param phpbb\config\config $config * @param \phpbb\config\config $config
* @param phpbb\request\request_interface $request * @param \phpbb\request\request_interface $request
*/ */
public function __construct(\phpbb\config\config $config, \phpbb\request\request_interface $request) public function __construct(\phpbb\config\config $config, \phpbb\request\request_interface $request)
{ {

View file

@ -67,7 +67,7 @@ interface service_interface
/** /**
* Sets the external library service provider * Sets the external library service provider
* *
* @param \OAuth\Common\Service\ServiceInterface $service * @param \OAuth\Common\Service\ServiceInterface $service_provider
*/ */
public function set_external_service_provider(\OAuth\Common\Service\ServiceInterface $service_provider); public function set_external_service_provider(\OAuth\Common\Service\ServiceInterface $service_provider);
} }

View file

@ -17,7 +17,6 @@ namespace phpbb\auth\provider\oauth;
use OAuth\OAuth1\Token\StdOAuth1Token; use OAuth\OAuth1\Token\StdOAuth1Token;
use OAuth\Common\Token\TokenInterface; use OAuth\Common\Token\TokenInterface;
use OAuth\Common\Storage\TokenStorageInterface; use OAuth\Common\Storage\TokenStorageInterface;
use OAuth\Common\Storage\Exception\StorageException;
use OAuth\Common\Storage\Exception\TokenNotFoundException; use OAuth\Common\Storage\Exception\TokenNotFoundException;
/** /**
@ -198,6 +197,7 @@ class token_storage implements TokenStorageInterface
/** /**
* Checks to see if an access token exists solely by the session_id of the user * Checks to see if an access token exists solely by the session_id of the user
* *
* @param string $service The name of the OAuth service
* @return bool true if they have token, false if they don't * @return bool true if they have token, false if they don't
*/ */
public function has_access_token_by_session($service) public function has_access_token_by_session($service)
@ -250,6 +250,7 @@ class token_storage implements TokenStorageInterface
* *
* @param array $data * @param array $data
* @return mixed * @return mixed
* @throws \OAuth\Common\Storage\Exception\TokenNotFoundException
*/ */
protected function _retrieve_access_token($data) protected function _retrieve_access_token($data)
{ {

View file

@ -148,7 +148,7 @@ interface provider_interface
* user_id of an account needed to successfully link an external account to * user_id of an account needed to successfully link an external account to
* a forum account. * a forum account.
* *
* @param array $link_data Any data needed to link a phpBB account to * @param array $login_link_data Any data needed to link a phpBB account to
* an external account. * an external account.
* @return string|null Returns a string with a language constant if there * @return string|null Returns a string with a language constant if there
* is data missing or null if there is no error. * is data missing or null if there is no error.