Skip to content

Commit

Permalink
Fixes openid#54. Pass request data to fix AX.
Browse files Browse the repository at this point in the history
AX fetch response is created based on AX fetch request data. Need to
pass the $request to the Auth_OpenID_AX_FetchResponse getExtensionArgs
method.
  • Loading branch information
Jannie committed May 8, 2013
1 parent 5de03d9 commit b22366f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Auth/OpenID/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function getExtensionArgs()
*
* Returns the message with the extension arguments added.
*/
function toMessage($message)
function toMessage($message, $request = null)
{
$implicit = $message->isOpenID1();
$added = $message->namespaces->addAlias($this->ns_uri,
Expand All @@ -53,8 +53,13 @@ function toMessage($message)
}
}

$message->updateArgs($this->ns_uri,
$this->getExtensionArgs());
if ($request !== null) {
$message->updateArgs($this->ns_uri,
$this->getExtensionArgs($request));
} else {
$message->updateArgs($this->ns_uri,
$this->getExtensionArgs());
}
return $message;
}
}
Expand Down

0 comments on commit b22366f

Please sign in to comment.