mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-15 13:58:24 +08:00
SREG and AX param merging order at OpenId::buildAuthUrl() changed.
This commit is contained in:
@@ -691,13 +691,13 @@ class OpenId extends BaseClient implements ClientInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$params = array_merge(
|
$params = array_merge(
|
||||||
$this->buildSregParams(),
|
|
||||||
[
|
[
|
||||||
'openid.return_to' => $returnUrl,
|
'openid.return_to' => $returnUrl,
|
||||||
'openid.mode' => 'checkid_setup',
|
'openid.mode' => 'checkid_setup',
|
||||||
'openid.identity' => $serverInfo['identity'],
|
'openid.identity' => $serverInfo['identity'],
|
||||||
'openid.trust_root' => $this->trustRoot,
|
'openid.trust_root' => $this->trustRoot,
|
||||||
]
|
],
|
||||||
|
$this->buildSregParams()
|
||||||
);
|
);
|
||||||
|
|
||||||
return $this->buildUrl($serverInfo['url'], ['query' => http_build_query($params, '', '&')]);
|
return $this->buildUrl($serverInfo['url'], ['query' => http_build_query($params, '', '&')]);
|
||||||
@@ -717,10 +717,10 @@ class OpenId extends BaseClient implements ClientInterface
|
|||||||
'openid.realm' => $this->getTrustRoot(),
|
'openid.realm' => $this->getTrustRoot(),
|
||||||
];
|
];
|
||||||
if ($serverInfo['ax']) {
|
if ($serverInfo['ax']) {
|
||||||
$params = array_merge($this->buildAxParams(), $params);
|
$params = array_merge($params, $this->buildAxParams());
|
||||||
}
|
}
|
||||||
if ($serverInfo['sreg']) {
|
if ($serverInfo['sreg']) {
|
||||||
$params = array_merge($this->buildSregParams(), $params);
|
$params = array_merge($params, $this->buildSregParams());
|
||||||
}
|
}
|
||||||
if (!$serverInfo['ax'] && !$serverInfo['sreg']) {
|
if (!$serverInfo['ax'] && !$serverInfo['sreg']) {
|
||||||
// If OP doesn't advertise either SREG, nor AX, let's send them both in worst case we don't get anything in return.
|
// If OP doesn't advertise either SREG, nor AX, let's send them both in worst case we don't get anything in return.
|
||||||
|
|||||||
Reference in New Issue
Block a user