SimpleSAML_Metadata_SAMLParser::getMetadata1xIdP PHP Method

getMetadata1xIdP() public method

This is an associative array with the following fields: - 'entityid': The entity id of the entity described in the metadata. - 'name': Auto generated name for this entity. Currently set to the entity id. - 'SingleSignOnService': String with the URL of the SSO service which supports the redirect binding. - 'SingleLogoutService': String with the URL where we should send logout requests/responses. - 'certData': X509Certificate for entity (if present). - 'certFingerprint': Fingerprint of the X509Certificate from the metadata. (deprecated) Metadata must be loaded with one of the parse functions before this function can be called.
public getMetadata1xIdP ( ) : array
return array An associative array with metadata or NULL if we are unable to generate metadata for a SAML 1.x IdP.
    public function getMetadata1xIdP()
    {
        $ret = $this->getMetadataCommon();
        $ret['metadata-set'] = 'shib13-idp-remote';
        // find IdP information which supports the SAML 1.x protocol
        $idp = $this->getIdPDescriptors(self::$SAML1xProtocols);
        if (count($idp) === 0) {
            return null;
        }
        // we currently only look at the first IDP descriptor which supports SAML 1.x
        $idp = $idp[0];
        // fdd expire time to metadata
        if (array_key_exists('expire', $idp)) {
            $ret['expire'] = $idp['expire'];
        }
        // find the SSO service endpoints
        $ret['SingleSignOnService'] = $idp['SingleSignOnService'];
        // find the ArtifactResolutionService endpoint
        $ret['ArtifactResolutionService'] = $idp['ArtifactResolutionService'];
        // add public keys
        if (!empty($idp['keys'])) {
            $ret['keys'] = $idp['keys'];
        }
        // add extensions
        $this->addExtensions($ret, $idp);
        // prioritize mdui:DisplayName as the name if available
        if (!empty($ret['UIInfo']['DisplayName'])) {
            $ret['name'] = $ret['UIInfo']['DisplayName'];
        }
        return $ret;
    }

Usage Example

 /**
  * 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;
 }
All Usage Examples Of SimpleSAML_Metadata_SAMLParser::getMetadata1xIdP