sspmod_saml_Auth_Source_SP::startSSO1 PHP Méthode

startSSO1() private méthode

Send a SAML1 SSO request to an IdP.
private startSSO1 ( SimpleSAML_Configuration $idpMetadata, array $state )
$idpMetadata SimpleSAML_Configuration The metadata of the IdP.
$state array The state array for the current authentication.
    private function startSSO1(SimpleSAML_Configuration $idpMetadata, array $state)
    {
        $idpEntityId = $idpMetadata->getString('entityid');
        $state['saml:idp'] = $idpEntityId;
        $ar = new SimpleSAML_XML_Shib13_AuthnRequest();
        $ar->setIssuer($this->entityId);
        $id = SimpleSAML_Auth_State::saveState($state, 'saml:sp:sso');
        $ar->setRelayState($id);
        $useArtifact = $idpMetadata->getBoolean('saml1.useartifact', NULL);
        if ($useArtifact === NULL) {
            $useArtifact = $this->metadata->getBoolean('saml1.useartifact', FALSE);
        }
        if ($useArtifact) {
            $shire = SimpleSAML\Module::getModuleURL('saml/sp/saml1-acs.php/' . $this->authId . '/artifact');
        } else {
            $shire = SimpleSAML\Module::getModuleURL('saml/sp/saml1-acs.php/' . $this->authId);
        }
        $url = $ar->createRedirect($idpEntityId, $shire);
        SimpleSAML\Logger::debug('Starting SAML 1 SSO to ' . var_export($idpEntityId, TRUE) . ' from ' . var_export($this->entityId, TRUE) . '.');
        \SimpleSAML\Utils\HTTP::redirectTrustedURL($url);
    }