Skip to content
Snippets Groups Projects
Commit 3dee673a authored by Tim Steiner's avatar Tim Steiner
Browse files

When doing CAS logouts, support a baseUrl with schema and host specified.

parent ecd90122
No related branches found
No related tags found
No related merge requests found
......@@ -48,13 +48,17 @@ abstract class Unl_Controller_Action_Authenticate extends Unl_Controller_Action
$this->_destroyUser(Zend_Auth::getInstance()->getIdentity());
Zend_Auth::getInstance()->clearIdentity();
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
if (parse_url($baseUrl, PHP_URL_SCHEME)) {
$returnUrl = $baseUrl;
} else {
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
$returnUrl = 'https://';
} else {
$returnUrl = 'http://';
}
$returnUrl .= $_SERVER['SERVER_NAME'] . Zend_Controller_Front::getInstance()->getBaseUrl();
$returnUrl .= $_SERVER['SERVER_NAME'] . $baseUrl;
}
$logoutUrl = $this->_getCasAdapter()->getLogoutUrl($returnUrl);
$this->_redirect($logoutUrl);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment