getAttributeAuthorities() public method

Retrieve AttributeAuthorities from the metadata.
public getAttributeAuthorities ( ) : array
return array Array of AttributeAuthorityDescriptor entries.
 /**
  * Retrieve metadata for the correct set from a SAML2Parser.
  *
  * @param SimpleSAML_Metadata_SAMLParser $entity  A SAML2Parser representing an entity.
  * @param string $set  The metadata set we are looking for.
  * @return array|NULL  The associative array with the metadata, or NULL if no metadata for
  *                     the given set was found.
  */
 private static function getParsedSet(SimpleSAML_Metadata_SAMLParser $entity, $set)
 {
     assert('is_string($set)');
     switch ($set) {
         case 'saml20-idp-remote':
             return $entity->getMetadata20IdP();
         case 'saml20-sp-remote':
             return $entity->getMetadata20SP();
         case 'shib13-idp-remote':
             return $entity->getMetadata1xIdP();
         case 'shib13-sp-remote':
             return $entity->getMetadata1xSP();
         case 'attributeauthority-remote':
             $ret = $entity->getAttributeAuthorities();
             return $ret[0];
         default:
             SimpleSAML_Logger::warning('MetaData - Handler.MDX: Unknown metadata set: ' . $set);
     }
     return NULL;
 }
Beispiel #2
0
 /**
  * Retrieve metadata for the correct set from a SAML2Parser.
  *
  * @param \SimpleSAML_Metadata_SAMLParser $entity A SAML2Parser representing an entity.
  * @param string                         $set The metadata set we are looking for.
  *
  * @return array|NULL  The associative array with the metadata, or NULL if no metadata for
  *                     the given set was found.
  */
 private static function getParsedSet(\SimpleSAML_Metadata_SAMLParser $entity, $set)
 {
     assert('is_string($set)');
     switch ($set) {
         case 'saml20-idp-remote':
             return $entity->getMetadata20IdP();
         case 'saml20-sp-remote':
             return $entity->getMetadata20SP();
         case 'shib13-idp-remote':
             return $entity->getMetadata1xIdP();
         case 'shib13-sp-remote':
             return $entity->getMetadata1xSP();
         case 'attributeauthority-remote':
             $ret = $entity->getAttributeAuthorities();
             return $ret[0];
         default:
             Logger::warning(__CLASS__ . ': unknown metadata set: \'' . $set . '\'.');
     }
     return null;
 }