1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

Merge branch 'develop' of https://github.com/phpbb/phpbb into feature/passwords

Conflicts:
	phpBB/config/services.yml
This commit is contained in:
Marc Alexander
2013-12-29 13:46:42 +01:00
619 changed files with 13392 additions and 5996 deletions

View File

@@ -9,14 +9,6 @@
namespace phpbb\auth;
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* Permission/Auth class
* @package phpBB3

View File

@@ -9,14 +9,6 @@
namespace phpbb\auth\provider;
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* Apache authentication provider for phpBB3
*

View File

@@ -9,14 +9,6 @@
namespace phpbb\auth\provider;
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* Base authentication provider class that all other providers should implement
*

View File

@@ -9,14 +9,6 @@
namespace phpbb\auth\provider;
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* Database authentication provider for phpBB3
*

View File

@@ -9,14 +9,6 @@
namespace phpbb\auth\provider;
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* Database authentication provider for phpBB3
*
@@ -106,7 +98,6 @@ class ldap extends \phpbb\auth\provider\base
@ldap_close($ldap);
if (!is_array($result) || sizeof($result) < 2)
{
return sprintf($this->user->lang['LDAP_NO_IDENTITY'], $this->user->data['username']);

View File

@@ -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))
{

View File

@@ -9,14 +9,6 @@
namespace phpbb\auth\provider\oauth\service;
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* Base OAuth abstract class that all OAuth services should implement
*

View File

@@ -9,14 +9,6 @@
namespace phpbb\auth\provider\oauth\service;
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* Bitly OAuth service
*

View File

@@ -7,19 +7,13 @@
*
*/
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
namespace phpbb\auth\provider\oauth\service;
/**
* OAuth service exception class
*
* @package auth
*/
class phpbb_auth_provider_oauth_service_exception extends RuntimeException
class exception extends \RuntimeException
{
}

View File

@@ -9,14 +9,6 @@
namespace phpbb\auth\provider\oauth\service;
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* Facebook OAuth service
*

View File

@@ -9,14 +9,6 @@
namespace phpbb\auth\provider\oauth\service;
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* Google OAuth service
*

View File

@@ -9,14 +9,6 @@
namespace phpbb\auth\provider\oauth\service;
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* OAuth service interface
*

View File

@@ -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;
}

View File

@@ -9,14 +9,6 @@
namespace phpbb\auth\provider;
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* The interface authentication provider classes have to implement.
*