SimpleSAML_XHTML_IdPDisco::start PHP Method

start() protected method

Check if an IdP is set or if the request is passive, and redirect accordingly.
protected start ( ) : void
return void If there is no IdP targeted and this is not a passive request.
    protected function start()
    {
        $idp = $this->getTargetIdp();
        if ($idp !== null) {
            $extDiscoveryStorage = $this->config->getString('idpdisco.extDiscoveryStorage', null);
            if ($extDiscoveryStorage !== null) {
                $this->log('Choice made [' . $idp . '] (Forwarding to external discovery storage)');
                \SimpleSAML\Utils\HTTP::redirectTrustedURL($extDiscoveryStorage, array('entityID' => $this->spEntityId, 'IdPentityID' => $idp, 'returnIDParam' => $this->returnIdParam, 'isPassive' => 'true', 'return' => $this->returnURL));
            } else {
                $this->log('Choice made [' . $idp . '] (Redirecting the user back. returnIDParam=' . $this->returnIdParam . ')');
                \SimpleSAML\Utils\HTTP::redirectTrustedURL($this->returnURL, array($this->returnIdParam => $idp));
            }
        }
        if ($this->isPassive) {
            $this->log('Choice not made. (Redirecting the user back without answer)');
            \SimpleSAML\Utils\HTTP::redirectTrustedURL($this->returnURL);
        }
    }