From 68408b09e2ff2c2112a31812d3a1adc218ccb34a Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@osticket.com>
Date: Fri, 17 Jan 2014 21:59:15 +0000
Subject: [PATCH] Implement authenticate at Staff/User authentication level

This allows SSO backends to ingore authenticate method
---
 include/class.auth.php | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/include/class.auth.php b/include/class.auth.php
index 83a9fcf0d..9a226c48e 100644
--- a/include/class.auth.php
+++ b/include/class.auth.php
@@ -345,6 +345,10 @@ abstract class StaffAuthenticationBackend  extends AuthenticationBackend {
         return $staff;
     }
 
+    function authenticate($username, $password) {
+        return false;
+    }
+
     // Generic authentication key for staff's backend is the username
     protected function getAuthKey($staff) {
 
@@ -418,6 +422,10 @@ abstract class UserAuthenticationBackend  extends AuthenticationBackend {
         return true;
     }
 
+    function authenticate($username, $password) {
+        return false;
+    }
+
     static function signOut($user) {
         global $ost;
 
@@ -736,10 +744,6 @@ class AuthTokenAuthentication extends UserAuthenticationBackend {
         return $user;
     }
 
-    function authenticate($username, $password) {
-        return false;
-    }
-
 }
 UserAuthenticationBackend::register(AuthTokenAuthentication);
 
-- 
GitLab