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

Traversing multiple attribute statements in one assertion in Shib SP

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@47 44740490-163a-0410-bde0-09ae8108e29a
parent e0cb4276
No related branches found
No related tags found
No related merge requests found
......@@ -242,15 +242,22 @@ class SimpleSAML_XML_Shib13_AuthnResponse extends SimpleSAML_XML_AuthnResponse {
}
if (isset($assertion->AttributeStatement->Attribute)) {
foreach ($assertion->AttributeStatement->Attribute AS $attribute) {
// Traverse AttributeStatements
foreach ($assertion->AttributeStatement AS $attributestatement) {
// Traverse Attributes
foreach ($attributestatement->Attribute AS $attribute) {
$values = array();
// Traverse Values
foreach ($attribute->AttributeValue AS $val) {
$values[] = (string) $val;
}
$attributes[(string)$attribute['AttributeName']] = $values;
}
}
}
......@@ -260,12 +267,12 @@ class SimpleSAML_XML_Shib13_AuthnResponse extends SimpleSAML_XML_AuthnResponse {
echo "<PRE>token:";
echo htmlentities($token->saveXML());
echo ":</PRE>";
*/
/*
echo '<pre>Attributes: ';
print_r($attributes);
echo '</pre>';
*/
*/
}
return $attributes;
......
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