[OpenID] How to implement AX with JanRain lib?

AOI NAKANISHI aoi_nakanishi at cybird.co.jp
Thu Oct 23 04:02:50 UTC 2008


Hi there.

How to implement AX with JanRain lib?

now I'm trying to build OpenID Provider with PHP JanRain lib.

 First of all, I downloaded "php-openid-2.x.x-snapshot". Then I
installed it.It's working well.

 I use Drupal for RP. with "OpenID module" and "OpenID Client AX
module".It also working well, I think.

 Then now, I put the codes:
#php-openid-2.x.x-snapshot/examples/server/lib/common.php
function doAuth(...
...
$sreg_request = Auth_OpenID_SRegRequest::fromOpenIDRequest($info);
// AX Code Start
$ax_response = new Auth_OpenID_AX_FetchResponse();
$ax_response->addValue('http://myserver/axschema/Auth.xml','1');
$ax_response->toMessage($response->fields);
// AX Code End

The request from Drupal is:
   openid.ax.mode=fetch_request&
   openid.ax.type.myauth=http://myserver/axschema/Auth.xml&
   openid.ax.if_available=myauth&

This code work for add some parameter:
   openid.ax.count.ext0=1&
   openid.ax.mode=fetch_response&
   openid.ax.type.ext0=http://myserver/axschema/Auth.xml&
   openid.ax.value.ext0.1=1&
   openid.signed=assoc_handle,...,
                 ax.count.ext0,
                 ax.mode,
                 ax.type.ext0,
                 ax.value.ext0.1

I think it must be:
   openid.ax.count.myauth=1&
   openid.ax.mode=fetch_response&
   openid.ax.type.myauth=http://myserver/axschema/Auth.xml&
   openid.ax.value.myauth.1=1&
   openid.signed=assoc_handle,...,
                 ax.count.myauth,
                 ax.mode,
                 ax.type.myauth,
                 ax.value.myauth.1

How can I use AX.php?
I tried to find some clues, but I couldn't find any code for AX
implementation.

I wonder if someone has any information about AX implementation with
JanRain PHP library.

Best Regards.

Aoi Nakanishi.



More information about the general mailing list