From 9864d39afa3126021d5f6542d1f495424c011d28 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 25 Jan 2011 01:32:27 -0700 Subject: [PATCH] Logging/error message if shibboleth auth fails validation --- framework/Core/lib/Horde/Core/Auth/Shibboleth.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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; } } -- 2.11.0