views:

277

answers:

1

I am trying to integrate an openID login in a ZF project (using the MVC). I get failures. When I traced the code I see the failures originate from: OpenId/Consumer.php (line ~740). Those lines try to analyze the open id protocol version from the first request done to the open id provider.
The regexp in the ZF expect to receive HTML with a LINK tag:

/<link[^>]*href=(["\

While when I look on the response, from google for example, I see I get XML. Google url I use: https://www.google.com/accounts/o8/id

The result I get from there:

<?xml version="1.0" encoding="UTF-8"?>
<xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)">
  <XRD>
  <Service priority="0">
  <Type>http://specs.openid.net/auth/2.0/server&lt;/Type&gt;
  <Type>http://openid.net/srv/ax/1.0&lt;/Type&gt;

  <URI>https://www.google.com/accounts/o8/ud&lt;/URI&gt;
  </Service>
  </XRD>
</xrds:XRDS>

Am I using the wrong link to google?

+2  A: 

Looking at the source code in the ZF trunk, it seems that currently, XRDS based discovery is not supported:

/* TODO: OpenID 2.0 (7.3) XRI and Yadis discovery */

ZF currently supports the HTML based one and Google returns an XDRS document with the endpoint address on it with their OpenId entry URL.

MC
Thanks. For my very first OpenID attempt I used to Google URL thinking it would work out of the box. I can stop hitting my head now.
Martijn Dijksterhuis