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

SAMLBuilder: Add support for attributes.NameFormat.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2163 44740490-163a-0410-bde0-09ae8108e29a
parent 7cc6b92f
No related branches found
No related tags found
No related merge requests found
......@@ -360,10 +360,14 @@ class SimpleSAML_Metadata_SAMLBuilder {
$attributeconsumer->appendChild($t);
}
$nameFormat = $metadata->getString('attributes.NameFormat', SAML2_Const::NAMEFORMAT_UNSPECIFIED);
foreach ($attributes as $attribute) {
$t = $this->createElement('RequestedAttribute');
$t->setAttribute('Name', $attribute);
if ($nameFormat !== SAML2_Const::NAMEFORMAT_UNSPECIFIED) {
$t->setAttribute('NameFormat', $nameFormat);
}
$attributeconsumer->appendChild($t);
}
......
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