From: Michael M Slusarz Date: Tue, 25 Jan 2011 08:32:27 +0000 (-0700) Subject: Logging/error message if shibboleth auth fails validation X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9864d39afa3126021d5f6542d1f495424c011d28;p=horde.git Logging/error message if shibboleth auth fails validation --- diff --git a/framework/Core/lib/Horde/Core/Auth/Shibboleth.php b/framework/Core/lib/Horde/Core/Auth/Shibboleth.php index 4bfec069d..5beedd6fe 100644 --- a/framework/Core/lib/Horde/Core/Auth/Shibboleth.php +++ b/framework/Core/lib/Horde/Core/Auth/Shibboleth.php @@ -23,8 +23,17 @@ class Horde_Core_Auth_Shibboleth extends Horde_Auth_Shibboleth */ public function validateAuth() { - return !empty($_SERVER[$this->getParam('username_header')]) && - ($this->_removeScope($_SERVER[$this->getParam('username_header')]) == $GLOBALS['registry']->getAuth('original')); + if (!empty($_SERVER[$this->getParam('username_header')]) && + ($this->_removeScope($_SERVER[$this->getParam('username_header')]) == $GLOBALS['registry']->getAuth('original'))) { + return true; + } + + // Consider this a session expiration. + $this->setError(Horde_Auth::REASON_SESSION); + + Horde::logMessage('Shibboleth authentication expired for user ' . $GLOBALS['registry']->getAuth(), 'INFO'); + + return false; } }