diff --git a/www/example-simple/shib13-example.php b/www/example-simple/shib13-example.php index 94f1b7ae43bb8c6e344040d7cbd81b162cd08830..dbec3bc4118f94441cd69bb75e606aabc7e8beab 100644 --- a/www/example-simple/shib13-example.php +++ b/www/example-simple/shib13-example.php @@ -50,7 +50,7 @@ if (!$session->isValid('shib13') ) { /* Prepare attributes for presentation * and call a hook function for organizing the attribute array */ -$attributes = $session->getAttributes(); +$attributes = $session->getAuthData('shib13', 'Attributes'); $para = array( 'attributes' => &$attributes ); @@ -69,10 +69,9 @@ SimpleSAML_Module::callHooks('attributepresentation', $para); $t = new SimpleSAML_XHTML_Template($config, 'status.php', 'attributes'); $t->data['header'] = '{status:header_shib}'; -$t->data['remaining'] = $session->remainingTime(); +$t->data['remaining'] = $session->getAuthData('shib13', 'Expire') - time(); $t->data['sessionsize'] = $session->getSize(); $t->data['attributes'] = $attributes; -$t->data['attributes'] = $session->getAttributes(); $t->data['logout'] = null; $t->show(); diff --git a/www/shib13/sp/AssertionConsumerService.php b/www/shib13/sp/AssertionConsumerService.php index 90ef7618ea175681be3cd52ca66344bd70619206..c392cebc6d4b6c64a9a9b7fc2f8c7870c22a06d0 100644 --- a/www/shib13/sp/AssertionConsumerService.php +++ b/www/shib13/sp/AssertionConsumerService.php @@ -24,14 +24,15 @@ function finishLogin($authProcState) { assert('array_key_exists("Source", $authProcState)'); assert('array_key_exists("entityid", $authProcState["Source"])'); - global $session; + $authData = array( + 'Attributes' => $authProcState['Attributes'], + 'saml:sp:NameID' => $authProcState['core:shib13-sp:NameID'], + 'saml:sp:SessionIndex' => $authProcState['core:shib13-sp:SessionIndex'], + 'saml:sp:IdP' => $authProcState['Source']['entityid'], + ); - /* Update the session information */ - $session->doLogin('shib13'); - $session->setAttributes($authProcState['Attributes']); - $session->setNameID($authProcState['core:shib13-sp:NameID']); - $session->setSessionIndex($authProcState['core:shib13-sp:SessionIndex']); - $session->setIdP($authProcState['Source']['entityid']); + global $session; + $session->doLogin('shib13', $authData); SimpleSAML_Utilities::redirect($authProcState['core:shib13-sp:TargetURL']); }