Skip to content
Snippets Groups Projects
Unverified Commit b85a0dfc authored by Tim van Dijen's avatar Tim van Dijen Committed by GitHub
Browse files
parent ce1d570e
No related branches found
No related tags found
No related merge requests found
......@@ -5,32 +5,31 @@
*
* @param array &$metadataHosted The metadata links for hosted metadata on the frontpage.
*/
function saml_hook_metadata_hosted(&$metadataHosted) {
assert(is_array($metadataHosted));
$sources = SimpleSAML_Auth_Source::getSourcesOfType('saml:SP');
foreach ($sources as $source) {
$metadata = $source->getMetadata();
$name = $metadata->getValue('name', NULL);
if ($name === NULL) {
$name = $metadata->getValue('OrganizationDisplayName', NULL);
}
if ($name === NULL) {
$name = $source->getAuthID();
}
$md = array(
'entityid' => $source->getEntityId(),
'metadata-index' => $source->getEntityId(),
'metadata-set' => 'saml20-sp-hosted',
'metadata-url' => $source->getMetadataURL() . '?output=xhtml',
'name' => $name,
);
$metadataHosted[] = $md;
}
function saml_hook_metadata_hosted(&$metadataHosted) {
assert(is_array($metadataHosted));
$sources = SimpleSAML_Auth_Source::getSourcesOfType('saml:SP');
foreach ($sources as $source) {
$metadata = $source->getMetadata();
$name = $metadata->getValue('name', null);
if ($name === null) {
$name = $metadata->getValue('OrganizationDisplayName', null);
}
if ($name === null) {
$name = $source->getAuthID();
}
$md = array(
'entityid' => $source->getEntityId(),
'metadata-index' => $source->getEntityId(),
'metadata-set' => 'saml20-sp-hosted',
'metadata-url' => $source->getMetadataURL() . '?output=xhtml',
'name' => $name,
);
$metadataHosted[] = $md;
}
}
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