SimpleSAML_IdP::getById PHP Méthode

getById() public static méthode

Retrieve an IdP by ID.
public static getById ( string $id ) : SimpleSAML_IdP
$id string The identifier of the IdP.
Résultat SimpleSAML_IdP The IdP.
    public static function getById($id)
    {
        assert('is_string($id)');
        if (isset(self::$idpCache[$id])) {
            return self::$idpCache[$id];
        }
        $idp = new self($id);
        self::$idpCache[$id] = $idp;
        return $idp;
    }

Usage Example

 public function actionSso()
 {
     $metadata = \SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
     $idpEntityId = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted');
     $idp = \SimpleSAML_IdP::getById('saml2:' . $idpEntityId);
     \sspmod_saml_IdP_SAML2::receiveAuthnRequest($idp);
     assert('FALSE');
 }
All Usage Examples Of SimpleSAML_IdP::getById