From f92498492623e17ec3372b6b3f713048d3b662f9 Mon Sep 17 00:00:00 2001 From: Klimov Paul Date: Wed, 1 Jan 2014 20:59:11 +0200 Subject: [PATCH] SREG and AX param merging order at OpenId::buildAuthUrl() changed. --- extensions/yii/authclient/OpenId.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/yii/authclient/OpenId.php b/extensions/yii/authclient/OpenId.php index 57b6a77..ea04d44 100644 --- a/extensions/yii/authclient/OpenId.php +++ b/extensions/yii/authclient/OpenId.php @@ -691,13 +691,13 @@ class OpenId extends BaseClient implements ClientInterface } $params = array_merge( - $this->buildSregParams(), [ '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, '', '&')]); @@ -717,10 +717,10 @@ class OpenId extends BaseClient implements ClientInterface 'openid.realm' => $this->getTrustRoot(), ]; if ($serverInfo['ax']) { - $params = array_merge($this->buildAxParams(), $params); + $params = array_merge($params, $this->buildAxParams()); } if ($serverInfo['sreg']) { - $params = array_merge($this->buildSregParams(), $params); + $params = array_merge($params, $this->buildSregParams()); } 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.