}
}
- return true;
+ $auth = self::singleton($GLOBALS['conf']['auth']['driver']);
+ return $auth->checkExistingAuth();
}
/**
abstract protected function _authenticate($userId, $credentials);
/**
+ * Check existing auth for triggers that might invalidate it.
+ *
+ * @return boolean Is existing auth valid?
+ */
+ public function checkExistingAuth()
+ {
+ return true;
+ }
+
+ /**
* Adds a set of authentication credentials.
*
* @param string $userId The userId to add.
}
/**
+ * Check existing auth for triggers that might invalidate it.
+ *
+ * @return boolean Is existing auth valid?
+ */
+ public function checkExistingAuth()
+ {
+ return !empty($_SERVER[$this->_params['username_header']]) &&
+ $_SERVER[$this->_params['username_header']] == Horde_Auth::getAuth();
+ }
+
+ /**
* Automatic authentication: check if the username is set in the
* configured header.
*