yii\authclient\OpenId::buildAuthUrlV1 PHP Method

buildAuthUrlV1() protected method

Builds authentication URL for the protocol version 1.
protected buildAuthUrlV1 ( array $serverInfo ) : string
$serverInfo array OpenID server info.
return string authentication URL.
    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, '', '&')]);
    }