From 3c11052fb3896b43685f596dc6e52f9cc07d6807 Mon Sep 17 00:00:00 2001 From: Joseph Warner Date: Thu, 11 Jul 2013 10:54:55 -0400 Subject: [feature/auth-refactor] Have a base auth class PHPBB3-9734 --- phpBB/includes/auth/provider/apache.php | 19 +-------- phpBB/includes/auth/provider/base.php | 69 +++++++++++++++++++++++++++++++++ phpBB/includes/auth/provider/db.php | 43 +------------------- phpBB/includes/auth/provider/ldap.php | 27 +------------ 4 files changed, 75 insertions(+), 83 deletions(-) create mode 100644 phpBB/includes/auth/provider/base.php (limited to 'phpBB') diff --git a/phpBB/includes/auth/provider/apache.php b/phpBB/includes/auth/provider/apache.php index 5f6f2862b6..e0217725d6 100644 --- a/phpBB/includes/auth/provider/apache.php +++ b/phpBB/includes/auth/provider/apache.php @@ -20,7 +20,8 @@ if (!defined('IN_PHPBB')) * * @package auth */ -class phpbb_auth_provider_apache implements phpbb_auth_provider_interface +class phpbb_auth_provider_apache extends phpbb_auth_provider_base + implements phpbb_auth_provider_interface { /** * Apache Authentication Constructor @@ -256,20 +257,4 @@ class phpbb_auth_provider_apache implements phpbb_auth_provider_interface return false; } - - /** - * {@inheritdoc} - */ - public function acp($new) - { - return; - } - - /** - * {@inheritdoc} - */ - public function logout($data, $new_session) - { - return; - } } diff --git a/phpBB/includes/auth/provider/base.php b/phpBB/includes/auth/provider/base.php new file mode 100644 index 0000000000..e053a1829b --- /dev/null +++ b/phpBB/includes/auth/provider/base.php @@ -0,0 +1,69 @@ +php_ext = $php_ext; } - /** - * {@inheritdoc} - */ - public function init() - { - return; - } - /** * {@inheritdoc} */ @@ -302,36 +295,4 @@ class phpbb_auth_provider_db implements phpbb_auth_provider_interface 'user_row' => $row, ); } - - /** - * {@inheritdoc} - */ - public function autologin() - { - return; - } - - /** - * {@inheritdoc} - */ - public function acp($new) - { - return; - } - - /** - * {@inheritdoc} - */ - public function logout($data, $new_session) - { - return; - } - - /** - * {@inheritdoc} - */ - public function validate_session($user) - { - return; - } } diff --git a/phpBB/includes/auth/provider/ldap.php b/phpBB/includes/auth/provider/ldap.php index f67c1e9247..dbb569f466 100644 --- a/phpBB/includes/auth/provider/ldap.php +++ b/phpBB/includes/auth/provider/ldap.php @@ -22,7 +22,8 @@ if (!defined('IN_PHPBB')) * * @package auth */ -class phpbb_auth_provider_ldap implements phpbb_auth_provider_interface +class phpbb_auth_provider_ldap extends phpbb_auth_provider_base + implements phpbb_auth_provider_interface { /** * LDAP Authentication Constructor @@ -283,14 +284,6 @@ class phpbb_auth_provider_ldap implements phpbb_auth_provider_interface ); } - /** - * {@inheritdoc} - */ - public function autologin() - { - return; - } - /** * {@inheritdoc} */ @@ -367,20 +360,4 @@ class phpbb_auth_provider_ldap implements phpbb_auth_provider_interface { return str_replace(array('*', '\\', '(', ')'), array('\\*', '\\\\', '\\(', '\\)'), $string); } - - /** - * {@inheritdoc} - */ - public function logout($data, $new_session) - { - return; - } - - /** - * {@inheritdoc} - */ - public function validate_session($user) - { - return; - } } -- cgit v1.2.1