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

saml2/idp: Do not include technical contact in metadata unless it is configured.

Thanks to Andjelko Horvat for providing this patch!

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2683 44740490-163a-0410-bde0-09ae8108e29a
parent b7f49f15
No related branches found
No related tags found
No related merge requests found
......@@ -95,10 +95,13 @@ try {
$metaBuilder = new SimpleSAML_Metadata_SAMLBuilder($idpentityid);
$metaBuilder->addMetadataIdP20($metaArray);
$metaBuilder->addOrganizationInfo($metaArray);
$metaBuilder->addContact('technical', array(
'emailAddress' => $config->getString('technicalcontact_email', NULL),
'name' => $config->getString('technicalcontact_name', NULL),
));
$technicalContactEmail = $config->getString('technicalcontact_email', NULL);
if ($technicalContactEmail && $technicalContactEmail !== 'na@example.org') {
$metaBuilder->addContact('technical', array(
'emailAddress' => $technicalContactEmail,
'name' => $config->getString('technicalcontact_name', NULL),
));
}
$metaxml = $metaBuilder->getEntityDescriptorText();
/* Sign the metadata if enabled. */
......
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