It’s just data

Optional Elements Required

Anne van Kesteren: The problem here is that OpenID does not use a proper HTML parser (not even one that follows the HTML 4 specification). <head> et cetera are actually required

The spec isn’t as clear as it ought to be.  From the OpenID Authentication 1.1 § 3.1:

In order for a Consumer to know the Identity Provider authoritative for an Identifier, the End User must add markup to the HEAD section of the HTML document located at their URL.

FWIW, I have a similar issue with the fact that the specs don’t distinguish between temporary and permanent redirects.  From § 3.2.1:

Consumers MUST canonicalize the Identifier URL, following redirects, and note the final URL. The final, canonicalized URL is the End User’s Identifier.


In OpenId 2.0, when making a Yadis file available for discovery, one can always set things up so that an HTTP response is given that include an X-XRDS-Location header. This avoids making relying parties parse HTML.

Posted by Tony Locke at

My id does a temporary redirect (302) to my Yadis file if the accept HTTP header includes application/xrds+xml.  Despite this response explicitly being a temporary redirect, many OpenID libraries (such as the JanRain ones) treat my Yadis file as my identity.

Posted by Sam Ruby at

Link to the original discussion.

Posted by Sam Ruby at

Because I had the same problem as Sam, I no longer do conditional redirection, but content negotiation instead, with a .var file at the root of my Web site (Apache), with the following rules (among others):

URI: index.html
Content-type: text/html;qs=0.5

URI: index.html
Content-type: application/xhtml+xml

URI: id/yadis.xrds.xml
Content-type: application/xrds+xml;qs=0.9

Posted by Alkarex at

FWIW, you actually want “optional tags required” as title. The element itself is required even by HTML 4.

Posted by Anne at

Sam: the OpenID libraries are functioning according to spec: they are actually required to normalise your identifier by following those redirects.  If you want to do yadis/XRDS based discovery, there are two options here:



Posted by James Henstridge at

James: I said “I have a similar issue with the fact that the specs don’t distinguish between temporary and permanent redirects.”  In other words, I take issue with the specs as currently written.

Posted by Sam Ruby at

Add your comment