Skip to content
Snippets Groups Projects
Commit 9061a753 authored by Olav Morken's avatar Olav Morken
Browse files

www/shib13/sp: Use the new interface in Session.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2643 44740490-163a-0410-bde0-09ae8108e29a
parent c0c57d61
No related branches found
No related tags found
No related merge requests found
...@@ -50,7 +50,7 @@ if (!$session->isValid('shib13') ) { ...@@ -50,7 +50,7 @@ if (!$session->isValid('shib13') ) {
/* Prepare attributes for presentation /* Prepare attributes for presentation
* and call a hook function for organizing the attribute array * and call a hook function for organizing the attribute array
*/ */
$attributes = $session->getAttributes(); $attributes = $session->getAuthData('shib13', 'Attributes');
$para = array( $para = array(
'attributes' => &$attributes 'attributes' => &$attributes
); );
...@@ -69,10 +69,9 @@ SimpleSAML_Module::callHooks('attributepresentation', $para); ...@@ -69,10 +69,9 @@ SimpleSAML_Module::callHooks('attributepresentation', $para);
$t = new SimpleSAML_XHTML_Template($config, 'status.php', 'attributes'); $t = new SimpleSAML_XHTML_Template($config, 'status.php', 'attributes');
$t->data['header'] = '{status:header_shib}'; $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['sessionsize'] = $session->getSize();
$t->data['attributes'] = $attributes; $t->data['attributes'] = $attributes;
$t->data['attributes'] = $session->getAttributes();
$t->data['logout'] = null; $t->data['logout'] = null;
$t->show(); $t->show();
......
...@@ -24,14 +24,15 @@ function finishLogin($authProcState) { ...@@ -24,14 +24,15 @@ function finishLogin($authProcState) {
assert('array_key_exists("Source", $authProcState)'); assert('array_key_exists("Source", $authProcState)');
assert('array_key_exists("entityid", $authProcState["Source"])'); 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 */ global $session;
$session->doLogin('shib13'); $session->doLogin('shib13', $authData);
$session->setAttributes($authProcState['Attributes']);
$session->setNameID($authProcState['core:shib13-sp:NameID']);
$session->setSessionIndex($authProcState['core:shib13-sp:SessionIndex']);
$session->setIdP($authProcState['Source']['entityid']);
SimpleSAML_Utilities::redirect($authProcState['core:shib13-sp:TargetURL']); SimpleSAML_Utilities::redirect($authProcState['core:shib13-sp:TargetURL']);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment