diff options
author | Andreas Åkre Solberg <andreas.solberg@uninett.no> | 2008-08-29 13:03:07 +0000 |
---|---|---|
committer | Andreas Åkre Solberg <andreas.solberg@uninett.no> | 2008-08-29 13:03:07 +0000 |
commit | 78670a3830fe6ad43173abb7e8cbf1b2f45fe96c (patch) | |
tree | 6488bb8eb7517529a5620ef9454f82ed6622ef56 /lib/SimpleSAML | |
parent | 4d9e77486efcad9cc6cad8eef2edbb0f994186fd (diff) | |
download | simplesamlphp-78670a3830fe6ad43173abb7e8cbf1b2f45fe96c.zip simplesamlphp-78670a3830fe6ad43173abb7e8cbf1b2f45fe96c.tar.gz simplesamlphp-78670a3830fe6ad43173abb7e8cbf1b2f45fe96c.tar.bz2 |
Fix for extended remote disco read
git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@848 44740490-163a-0410-bde0-09ae8108e29a
Diffstat (limited to 'lib/SimpleSAML')
-rw-r--r-- | lib/SimpleSAML/XHTML/IdPDisco.php | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/lib/SimpleSAML/XHTML/IdPDisco.php b/lib/SimpleSAML/XHTML/IdPDisco.php index b80b93d..e19b432 100644 --- a/lib/SimpleSAML/XHTML/IdPDisco.php +++ b/lib/SimpleSAML/XHTML/IdPDisco.php @@ -123,6 +123,8 @@ class SimpleSAML_XHTML_IdPDisco { } else { $this->returnIdParam = $_GET['returnIDParam']; } + + $this->log('returnIdParam initially set to [' . $this->returnIdParam . ']'); if(!array_key_exists('return', $_GET)) { throw new Exception('Missing parameter: return'); @@ -131,9 +133,10 @@ class SimpleSAML_XHTML_IdPDisco { } $this->isPassive = FALSE; - if (!array_key_exists('isPassive', $_GET)) { + if (array_key_exists('isPassive', $_GET)) { if ($_GET['isPassive'] === 'true') $this->isPassive = TRUE; } + $this->log('isPassive initially set to [' . ($this->isPassive ? 'TRUE' : 'FALSE' ) . ']'); if (!array_key_exists('IdPentityID', $_GET)) { $setIdPentityID = $_GET['IdPentityID']; @@ -277,8 +280,16 @@ class SimpleSAML_XHTML_IdPDisco { } if($this->getCookie('remember') === '1') { + $this->log('Return previously saved IdP because of remember cookie set to 1'); + return $this->getPreviousIdP(); + } + + if( $this->isPassive) { + $this->log('Return previously saved IdP because of isPassive'); return $this->getPreviousIdP(); } + + return NULL; } @@ -362,6 +373,8 @@ class SimpleSAML_XHTML_IdPDisco { return $idp; } + $this->log('getSelectedIdP() returned NULL'); + /* Check if the user has saved an choice earlier. */ $idp = $this->getSavedIdP(); if($idp !== NULL) { @@ -388,15 +401,16 @@ class SimpleSAML_XHTML_IdPDisco { $extDiscoveryStorage = $this->config->getValue('idpdisco.extDiscoveryStorage'); $this->log('Choice made [' . $idp . '] (Forwarding to external discovery storage)'); SimpleSAML_Utilities::redirect($extDiscoveryStorage, array( - $this->returnIdParam => $idp, +// $this->returnIdParam => $idp, + 'entityID' => $this->spEntityId, 'IdPentityID' => $idp, - 'returnIdParam' => $this->returnIdParam, + 'returnIDParam' => $this->returnIdParam, 'isPassive' => 'true', 'return' => $this->returnURL )); } else { - $this->log('Choice made [' . $idp . '] (Redirecting the user back)'); + $this->log('Choice made [' . $idp . '] (Redirecting the user back. returnIDParam=' . $this->returnIdParam . ')'); SimpleSAML_Utilities::redirect($this->returnURL, array($this->returnIdParam => $idp)); } |