From 80a120996e7d49b5b45acf3d1382c04ce3bd21be Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Fri, 17 Jan 2014 15:53:20 +0000 Subject: [PATCH] Change singleSignOn to procesSignOn SSO was originally used for a SSO plugin. The backend has since been refactored to support other authentication backends. --- include/class.auth.php | 3 +-- scp/login.php | 2 +- view.php | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/class.auth.php b/include/class.auth.php index 9913c43e8..0653fa258 100644 --- a/include/class.auth.php +++ b/include/class.auth.php @@ -132,8 +132,7 @@ abstract class AuthenticationBackend { Signal::send('auth.login.failed', null, $info); } - function singleSignOn(&$errors) { - global $ost; + function processSignOn(&$errors) { foreach (static::allRegistered() as $bk) { // All backends are queried here, even if they don't support diff --git a/scp/login.php b/scp/login.php index 3fb7da412..840716c65 100644 --- a/scp/login.php +++ b/scp/login.php @@ -37,7 +37,7 @@ if($_POST) { } // Consider single sign-on authentication backends else if (!$thisstaff || !($thisstaff->getId() || $thisstaff->isValid())) { - if (($user = StaffAuthenticationBackend::singleSignOn($errors)) + if (($user = StaffAuthenticationBackend::processSignOn($errors)) && ($user instanceof StaffSession)) @header("Location: $dest"); } diff --git a/view.php b/view.php index 28caa2023..2398fff56 100644 --- a/view.php +++ b/view.php @@ -22,7 +22,7 @@ if (!$thisclient || !$thisclient->isValid()) { // Try autologin the user // Authenticated user can be of type ticket owner or collaborator $errors = array(); - $user = UserAuthenticationBackend::singleSignOn($errors); + $user = UserAuthenticationBackend::processSignOn($errors); if ($user && $user->getTicketId()) @header('Location: tickets.php?id='.$user->getTicketId()); } -- GitLab