Skip to content
Snippets Groups Projects
Commit 1546af50 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

renaming a variable to fix attribute mapping

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@292 44740490-163a-0410-bde0-09ae8108e29a
parent f32d92c0
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,7 @@ $session = SimpleSAML_Session::getInstance(true); ...@@ -29,7 +29,7 @@ $session = SimpleSAML_Session::getInstance(true);
try { try {
$idpentityid = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted'); $idpentityid = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted');
$idpmeta = $metadata->getMetaDataCurrent('saml20-idp-hosted'); $idpmetadata = $metadata->getMetaDataCurrent('saml20-idp-hosted');
} catch (Exception $exception) { } catch (Exception $exception) {
SimpleSAML_Utilities::fatalError($session->getTrackID(), 'METADATA', $exception); SimpleSAML_Utilities::fatalError($session->getTrackID(), 'METADATA', $exception);
} }
...@@ -109,7 +109,7 @@ if (isset($_GET['SAMLRequest'])) { ...@@ -109,7 +109,7 @@ if (isset($_GET['SAMLRequest'])) {
} }
$authority = isset($idpmeta['authority']) ? $idpmeta['authority'] : null; $authority = isset($idpmetadata['authority']) ? $idpmetadata['authority'] : null;
/* /*
...@@ -123,11 +123,12 @@ $authority = isset($idpmeta['authority']) ? $idpmeta['authority'] : null; ...@@ -123,11 +123,12 @@ $authority = isset($idpmeta['authority']) ? $idpmeta['authority'] : null;
*/ */
if (!isset($session) || !$session->isValid($authority) ) { if (!isset($session) || !$session->isValid($authority) ) {
Logger::notice('SAML2.0 - IdP.SSOService: Will go to authentication module ' . $idpmeta['auth']);
Logger::notice('SAML2.0 - IdP.SSOService: Will go to authentication module ' . $idpmetadata['auth']);
$relaystate = SimpleSAML_Utilities::selfURLNoQuery() . $relaystate = SimpleSAML_Utilities::selfURLNoQuery() .
'?RequestID=' . urlencode($requestid); '?RequestID=' . urlencode($requestid);
$authurl = '/' . $config->getValue('baseurlpath') . $idpmeta['auth']; $authurl = '/' . $config->getValue('baseurlpath') . $idpmetadata['auth'];
SimpleSAML_Utilities::redirect($authurl, SimpleSAML_Utilities::redirect($authurl,
array('RelayState' => $relaystate)); array('RelayState' => $relaystate));
...@@ -147,8 +148,8 @@ if (!isset($session) || !$session->isValid($authority) ) { ...@@ -147,8 +148,8 @@ if (!isset($session) || !$session->isValid($authority) ) {
* Dealing with attribute release consent. * Dealing with attribute release consent.
*/ */
if (array_key_exists('requireconsent', $idpmeta) if (array_key_exists('requireconsent', $idpmetadata)
&& $idpmeta['requireconsent']) { && $idpmetadata['requireconsent']) {
if (!isset($_GET['consent'])) { if (!isset($_GET['consent'])) {
...@@ -178,11 +179,9 @@ if (!isset($session) || !$session->isValid($authority) ) { ...@@ -178,11 +179,9 @@ if (!isset($session) || !$session->isValid($authority) ) {
/* /*
* Filtering attributes. * Filtering attributes.
*/ */
# print_r($session->getAttributes());
$ar = new SimpleSAML_XML_SAML20_AuthnResponse($config, $metadata); $ar = new SimpleSAML_XML_SAML20_AuthnResponse($config, $metadata);
$afilter = new SimpleSAML_XML_AttributeFilter($config, $session->getAttributes()); $afilter = new SimpleSAML_XML_AttributeFilter($config, $session->getAttributes());
if (isset($spmetadata['attributemap'])) { if (isset($spmetadata['attributemap'])) {
$afilter->namemap($spmetadata['attributemap']); $afilter->namemap($spmetadata['attributemap']);
} }
...@@ -205,8 +204,6 @@ if (!isset($session) || !$session->isValid($authority) ) { ...@@ -205,8 +204,6 @@ if (!isset($session) || !$session->isValid($authority) ) {
} }
$filteredattributes = $afilter->getAttributes(); $filteredattributes = $afilter->getAttributes();
# print_r($filteredattributes);
//echo '<pre>before filter:' ; print_r($session->getAttributes()); echo "\n\n"; print_r($filteredattributes); echo '</pre>'; exit; //echo '<pre>before filter:' ; print_r($session->getAttributes()); echo "\n\n"; print_r($filteredattributes); echo '</pre>'; exit;
// Generate an SAML 2.0 AuthNResponse message // Generate an SAML 2.0 AuthNResponse message
......
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