ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
hook_metadata_hosted.php File Reference

Go to the source code of this file.

Functions

 saml_hook_metadata_hosted (&$metadataHosted)
 Hook to add the metadata for hosted entities to the frontpage. More...
 

Function Documentation

◆ saml_hook_metadata_hosted()

saml_hook_metadata_hosted ( $metadataHosted)

Hook to add the metadata for hosted entities to the frontpage.

Parameters
array&$metadataHostedThe metadata links for hosted metadata on the frontpage.

Definition at line 9 of file hook_metadata_hosted.php.

References $metadata, $metadataHosted, $name, $source, and SimpleSAML_Auth_Source\getSourcesOfType().

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__']
$source
Definition: linkback.php:22
static getSourcesOfType($type)
Get sources of a specific type.
Definition: Source.php:53
+ Here is the call graph for this function: