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

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

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2644 44740490-163a-0410-bde0-09ae8108e29a
parent 9061a753
No related branches found
No related tags found
No related merge requests found
...@@ -12,12 +12,12 @@ if (!$session->isValid('wsfed') ) { ...@@ -12,12 +12,12 @@ if (!$session->isValid('wsfed') ) {
); );
} }
$attributes = $session->getAttributes(); $attributes = $session->getAuthData('wsfed', 'Attributes');
$t = new SimpleSAML_XHTML_Template($config, 'status.php', 'attributes'); $t = new SimpleSAML_XHTML_Template($config, 'status.php', 'attributes');
$t->data['header'] = '{status:header_wsfed}'; $t->data['header'] = '{status:header_wsfed}';
$t->data['remaining'] = $session->remainingTime(); $t->data['remaining'] = $session->getAuthData('wsfed', 'Expire') - time();
$t->data['sessionsize'] = $session->getSize(); $t->data['sessionsize'] = $session->getSize();
$t->data['attributes'] = $attributes; $t->data['attributes'] = $attributes;
$t->data['logouturl'] = '/' . $config->getBaseURL() . 'wsfed/sp/initSLO.php?RelayState=/' . $config->getBaseURL() . 'logout.php'; $t->data['logouturl'] = '/' . $config->getBaseURL() . 'wsfed/sp/initSLO.php?RelayState=/' . $config->getBaseURL() . 'logout.php';
......
...@@ -25,14 +25,14 @@ if (isset($session) ) { ...@@ -25,14 +25,14 @@ if (isset($session) ) {
$metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler(); $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
$idpentityid = $session->getIdP(); $idpentityid = $session->getAuthData('wsfed', 'saml:sp:IdP');
$spentityid = isset($_GET['spentityid']) ? $_GET['spentityid'] : $metadata->getMetaDataCurrentEntityID(); $spentityid = isset($_GET['spentityid']) ? $_GET['spentityid'] : $metadata->getMetaDataCurrentEntityID();
/** /**
* Create a logout request * Create a logout request
*/ */
$session->doLogout(); $session->doLogout('wsfed');
SimpleSAML_Logger::info('WS-Fed - SP.initSLO: SP (' . $spentityid . ') is sending logout request to IdP (' . $idpentityid . ')'); SimpleSAML_Logger::info('WS-Fed - SP.initSLO: SP (' . $spentityid . ') is sending logout request to IdP (' . $idpentityid . ')');
......
...@@ -134,10 +134,12 @@ try { ...@@ -134,10 +134,12 @@ try {
/* Mark the user as logged in. */ /* Mark the user as logged in. */
$session->doLogin('wsfed'); $authData = array(
$session->setAttributes($attributes); 'Attributes' => $attributes,
$session->setNameID($nameid); 'saml:sp:NameID' => $nameid,
$session->setIdP($idpEntityId); 'saml:sp:IdP' => $idpEntityId,
);
$session->doLogin('wsfed', $authData);
/* Redirect the user back to the page which requested the login. */ /* Redirect the user back to the page which requested the login. */
SimpleSAML_Utilities::redirect($wctx); SimpleSAML_Utilities::redirect($wctx);
......
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