Skip to content
Snippets Groups Projects
Unverified Commit c9af78ab authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo
Browse files

Handle NameIDPolicy with values different than a string in the metadata page.

parent a5437da2
No related branches found
No related tags found
No related merge requests found
......@@ -138,9 +138,16 @@ if ($certInfo !== null && array_key_exists('certData', $certInfo)) {
$certData = null;
}
$format = $spconfig->getString('NameIDPolicy', null);
$format = $spconfig->getValue('NameIDPolicy', null);
if ($format !== null) {
$metaArray20['NameIDFormat'] = $format;
if (is_array($format)) {
$metaArray20['NameIDFormat'] = SimpleSAML_Configuration::loadFromArray($format)->getString(
'Format',
\SAML2\Constants::NAMEID_TRANSIENT
);
} elseif (is_string($format)) {
$metaArray20['NameIDFormat'] = $format;
}
}
$name = $spconfig->getLocalizedString('name', null);
......
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