protected function buildAuthUrlV1($serverInfo)
    {
        $returnUrl = $this->getReturnUrl();
        /* If we have an openid.delegate that is different from our claimed id,
        we need to somehow preserve the claimed id between requests.
        The simplest way is to just send it along with the return_to url.*/
        if ($serverInfo['identity'] != $this->getClaimedId()) {
            $returnUrl .= (strpos($returnUrl, '?') ? '&' : '?') . 'openid.claimed_id=' . $this->getClaimedId();
        }

        $params = array_merge(
            [
                'openid.return_to' => $returnUrl,
                'openid.mode' => 'checkid_setup',
                'openid.identity' => $serverInfo['identity'],
                'openid.trust_root' => $this->trustRoot,
            ],
            $this->buildSregParams()
        );

        return $this->buildUrl($serverInfo['url'], ['query' => http_build_query($params, '', '&')]);
    }
protected function buildAuthUrlV1($serverInfo)
    {
        $returnUrl = $this->getReturnUrl();
        /* If we have an openid.delegate that is different from our claimed id,
        we need to somehow preserve the claimed id between requests.
        The simplest way is to just send it along with the return_to url.*/
        if ($serverInfo['identity'] != $this->getClaimedId()) {
            $returnUrl .= (strpos($returnUrl, '?') ? '&' : '?') . 'openid.claimed_id=' . $this->getClaimedId();
        }

        $params = array_merge(
            [
                'openid.return_to' => $returnUrl,
                'openid.mode' => 'checkid_setup',
                'openid.identity' => $serverInfo['identity'],
                'openid.trust_root' => $this->trustRoot,
            ],
            $this->buildSregParams()
        );

        return $this->buildUrl($serverInfo['url'], ['query' => http_build_query($params, '', '&')]);
    }
protected function buildAuthUrlV1 ( $ serverInfo ) { $ returnUrl = $ this -> getReturnUrl ( ) ; /* If we have an openid.delegate that is different from our claimed id,
        we need to somehow preserve the claimed id between requests.
        The simplest way is to just send it along with the return_to url.*/ if ( $ serverInfo [ 'identity' ] != $ this -> getClaimedId ( ) ) { $ returnUrl .= ( strpos ( $ returnUrl , '?' ) ? '&' : '?' ) . 'openid.claimed_id=' . $ this -> getClaimedId ( ) ; } $ params = array_merge ( [ 'openid.return_to' => $ returnUrl , 'openid.mode' => 'checkid_setup' , 'openid.identity' => $ serverInfo [ 'identity' ] , 'openid.trust_root' => $ this -> trustRoot , ] , $ this -> buildSregParams ( ) ) ; return $ this -> buildUrl ( $ serverInfo [ 'url' ] , [ 'query' => http_build_query ( $ params , '' , '&' ) ] ) ; }
Builds authentication URL for the protocol version 1.
@param array $serverInfo OpenID server info.
@return string authentication URL.
Builds authentication URL for the protocol version 1 .