aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-02-03 15:29:43 +0100
committerMarc Alexander <admin@m-a-styles.de>2014-02-03 18:08:13 +0100
commit2c9e6f196b12681e63afbe3f81c44fd6e2bde97a (patch)
treefb444f425c2fcfba34338efd42b4d613c3389267 /phpBB
parent2fa491f965e85a71b7b1465d5364b7e1789c60b7 (diff)
downloadforums-2c9e6f196b12681e63afbe3f81c44fd6e2bde97a.tar
forums-2c9e6f196b12681e63afbe3f81c44fd6e2bde97a.tar.gz
forums-2c9e6f196b12681e63afbe3f81c44fd6e2bde97a.tar.bz2
forums-2c9e6f196b12681e63afbe3f81c44fd6e2bde97a.tar.xz
forums-2c9e6f196b12681e63afbe3f81c44fd6e2bde97a.zip
[ticket/12156] Add missing passwords manager to oauth
PHPBB3-12156
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/config/auth_providers.yml1
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php13
2 files changed, 12 insertions, 2 deletions
diff --git a/phpBB/config/auth_providers.yml b/phpBB/config/auth_providers.yml
index 43648b4ad3..dac8b9d252 100644
--- a/phpBB/config/auth_providers.yml
+++ b/phpBB/config/auth_providers.yml
@@ -43,6 +43,7 @@ services:
arguments:
- @dbal.conn
- @config
+ - @passwords.manager
- @request
- @user
- %tables.auth_provider_oauth_token_storage%
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index 2749661269..0128c89248 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -34,6 +34,13 @@ class oauth extends \phpbb\auth\provider\base
protected $config;
/**
+ * phpBB passwords manager
+ *
+ * @var \phpbb\passwords\manager
+ */
+ protected $passwords_manager;
+
+ /**
* phpBB request object
*
* @var \phpbb\request\request_interface
@@ -101,6 +108,7 @@ class oauth extends \phpbb\auth\provider\base
*
* @param \phpbb\db\driver\driver $db
* @param \phpbb\config\config $config
+ * @param \phpbb\passwords\manager $passwords_manager
* @param \phpbb\request\request_interface $request
* @param \phpbb\user $user
* @param string $auth_provider_oauth_token_storage_table
@@ -110,10 +118,11 @@ class oauth extends \phpbb\auth\provider\base
* @param string $phpbb_root_path
* @param string $php_ext
*/
- public function __construct(\phpbb\db\driver\driver $db, \phpbb\config\config $config, \phpbb\request\request_interface $request, \phpbb\user $user, $auth_provider_oauth_token_storage_table, $auth_provider_oauth_token_account_assoc, \phpbb\di\service_collection $service_providers, $users_table, $phpbb_root_path, $php_ext)
+ public function __construct(\phpbb\db\driver\driver $db, \phpbb\config\config $config, \phpbb\passwords\manager $passwords_manager, \phpbb\request\request_interface $request, \phpbb\user $user, $auth_provider_oauth_token_storage_table, $auth_provider_oauth_token_account_assoc, \phpbb\di\service_collection $service_providers, $users_table, $phpbb_root_path, $php_ext)
{
$this->db = $db;
$this->config = $config;
+ $this->passwords_manager = $passwords_manager;
$this->request = $request;
$this->user = $user;
$this->auth_provider_oauth_token_storage_table = $auth_provider_oauth_token_storage_table;
@@ -150,7 +159,7 @@ class oauth extends \phpbb\auth\provider\base
// Temporary workaround for only having one authentication provider available
if (!$this->request->is_set('oauth_service'))
{
- $provider = new \phpbb\auth\provider\db($this->db, $this->config, $this->request, $this->user, $this->phpbb_root_path, $this->php_ext);
+ $provider = new \phpbb\auth\provider\db($this->db, $this->config, $this->passwords_manager, $this->request, $this->user, $this->phpbb_root_path, $this->php_ext);
return $provider->login($username, $password);
}