--- auth/saml/index.old.php 2016-03-21 10:04:00.579063664 -0700 +++ auth/saml/index.php 2016-03-21 12:00:57.010677579 -0700 @@ -53,24 +53,19 @@ // get all the things that we will need from the SAML authentication // and then shutdown the session control SimpleSAML_Configuration::init($samlconfig); -$saml_session = SimpleSAML_Session::getInstance(); +$saml_session = SimpleSAML_Session::getSessionFromRequest(); -// do we have a logout request? -if (param_variable("logout", false)) { - // logout the saml session - $sp = $saml_session->getAuthority(); - if (! $sp) { - $sp = 'default-sp'; - } - $as = new SimpleSAML_Auth_Simple($sp); - $as->logout($CFG->wwwroot); -} $sp = param_alphanumext('as','default-sp'); if (! in_array($sp, SimpleSAML_Auth_Source::getSources())) { $sp = 'default-sp'; } $as = new SimpleSAML_Auth_Simple($sp); +// do we have a logout request? +if (param_variable("logout", false)) { + $as->logout($CFG->wwwroot); +} + // Check the SimpleSAMLphp config is compatible $saml_config = SimpleSAML_Configuration::getInstance(); $session_handler = $saml_config->getString('session.handler', false); @@ -88,7 +83,7 @@ if (isset($_SESSION['wantsurl'])) { $wantsurl = $_SESSION['wantsurl']; } - else if (! $saml_session->getIdP()) { + else if (! $as->getAuthData('saml:sp:IdP')) { $wantsurl = array_key_exists('HTTP_REFERER',$_SERVER) ? $_SERVER['HTTP_REFERER'] : $CFG->wwwroot; } else {