Skip to content
Snippets Groups Projects
Commit 80a12099 authored by Peter Rotich's avatar Peter Rotich
Browse files

Change singleSignOn to procesSignOn

SSO was originally used for a SSO plugin. The backend has since been
refactored to support other authentication backends.
parent 680d96d0
Branches
Tags
No related merge requests found
......@@ -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
......
......@@ -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");
}
......
......@@ -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());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment