diff options
author | Jaime Perez Crespo <jaime.perez@uninett.no> | 2015-08-05 11:12:05 +0200 |
---|---|---|
committer | Jaime Perez Crespo <jaime.perez@uninett.no> | 2015-08-05 11:12:05 +0200 |
commit | b5757a059a16c148be8a8561e0099a3cabe917da (patch) | |
tree | 638ff64315e6030eccbb30bc7a345e17edd60e55 /lib/SimpleSAML/Metadata/SAMLParser.php | |
parent | 4c742189b78a9a6b2cdd4b03b133ae8fe6b97787 (diff) | |
download | simplesamlphp-b5757a059a16c148be8a8561e0099a3cabe917da.zip simplesamlphp-b5757a059a16c148be8a8561e0099a3cabe917da.tar.gz simplesamlphp-b5757a059a16c148be8a8561e0099a3cabe917da.tar.bz2 |
Parse the "Hide From Discovery" REFEDS Entity Category in SAML metadata as the new 'hide.from.discovery' configuration option for remote IdP metadata.
Diffstat (limited to 'lib/SimpleSAML/Metadata/SAMLParser.php')
-rw-r--r-- | lib/SimpleSAML/Metadata/SAMLParser.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/SimpleSAML/Metadata/SAMLParser.php b/lib/SimpleSAML/Metadata/SAMLParser.php index ffeca74..5cbd563 100644 --- a/lib/SimpleSAML/Metadata/SAMLParser.php +++ b/lib/SimpleSAML/Metadata/SAMLParser.php @@ -488,6 +488,15 @@ class SimpleSAML_Metadata_SAMLParser if (!empty($this->entityAttributes)) { $metadata['EntityAttributes'] = $this->entityAttributes; + + // check for entity categories + $entity_category = 'http://macedir.org/entity-category'; + $hide_from_discovery = 'http://refeds.org/category/hide-from-discovery'; + if (array_key_exists($entity_category, $metadata['EntityAttributes'])) { + if (in_array($hide_from_discovery, $metadata['EntityAttributes'][$entity_category])) { + $metadata['hide.from.discovery'] = true; + } + } } if (!empty($roleDescriptor['UIInfo'])) { |