ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
hook_metadata_hosted.php
Go to the documentation of this file.
1<?php
2
9 assert('is_array($metadataHosted)');
10
11 $sources = SimpleSAML_Auth_Source::getSourcesOfType('saml:SP');
12
13 foreach ($sources as $source) {
14
15 $metadata = $source->getMetadata();
16
17 $name = $metadata->getValue('name', NULL);
18 if ($name === NULL) {
19 $name = $metadata->getValue('OrganizationDisplayName', NULL);
20 }
21 if ($name === NULL) {
22 $name = $source->getAuthID();
23 }
24
25 $md = array(
26 'entityid' => $source->getEntityId(),
27 'metadata-index' => $source->getEntityId(),
28 'metadata-set' => 'saml20-sp-hosted',
29 'metadata-url' => $source->getMetadataURL() . '?output=xhtml',
30 'name' => $name,
31 );
32
33 $metadataHosted[] = $md;
34 }
35
36}
$metadata['__DYNAMIC:1__']
$source
Definition: linkback.php:22
An exception for terminatinating execution or to throw for unit testing.
static getSourcesOfType($type)
Get sources of a specific type.
Definition: Source.php:52
saml_hook_metadata_hosted(&$metadataHosted)
Hook to add the metadata for hosted entities to the frontpage.
if($format !==null) $name
Definition: metadata.php:146