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