diff options
author | Joseph Warner <hardolaf@hardolaf.com> | 2013-06-19 15:32:20 -0400 |
---|---|---|
committer | Joseph Warner <hardolaf@hardolaf.com> | 2013-06-19 15:33:59 -0400 |
commit | 8214e6e8377b0858092e48aba3ba2a01994be47f (patch) | |
tree | cc810871a1a503e52cbcdb0bd09983f2eaabda52 /phpBB/includes/session.php | |
parent | f4def220ce00a6be06857d5bd9f164473c0411c4 (diff) | |
download | forums-8214e6e8377b0858092e48aba3ba2a01994be47f.tar forums-8214e6e8377b0858092e48aba3ba2a01994be47f.tar.gz forums-8214e6e8377b0858092e48aba3ba2a01994be47f.tar.bz2 forums-8214e6e8377b0858092e48aba3ba2a01994be47f.tar.xz forums-8214e6e8377b0858092e48aba3ba2a01994be47f.zip |
[feature/auth-refactor] Finish refactoring auth plugins
I believe that this commit should have final minimal changes needed
to replace the old auth plugins with the refactored auth plugins.
Added a few more elements to the interface based on the old auth
plugins. Documentation is not complete and need works on these new
elements.
PHPBB3-9734
Diffstat (limited to 'phpBB/includes/session.php')
-rw-r--r-- | phpBB/includes/session.php | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 85ca8abf3d..f12ba1329c 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -402,12 +402,13 @@ class phpbb_session // Check whether the session is still valid if we have one $method = basename(trim($config['auth_method'])); - include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx); - $method = 'validate_session_' . $method; - if (function_exists($method)) + $class = 'phpbb_auth_provider_' . $method; + if (class_exists($class)) { - if (!$method($this->data)) + $provider = new $class(); + $ret = $provider->validate_session($this->data); + if ($ret !== null && !$ret) { $session_expired = true; } @@ -573,7 +574,7 @@ class phpbb_session if (class_exists($class)) { $provider = new $class(); - $this->data = $class->autologin(); + $this->data = $provider->autologin(); if (sizeof($this->data)) { @@ -893,12 +894,12 @@ class phpbb_session // Allow connecting logout with external auth method logout $method = basename(trim($config['auth_method'])); - include_once($phpbb_root_path . 'includes/auth/auth_' . $method . '.' . $phpEx); - $method = 'logout_' . $method; - if (function_exists($method)) + $class = 'phpbb_auth_provider_' . $method; + if (class_exists($class)) { - $method($this->data, $new_session); + $provider = new $class(); + $provider->logout($this->data, $new_session); } if ($this->data['user_id'] != ANONYMOUS) |