Backporting the 2.0 extension mechanism to 1.1

James Henstridge james at jamesh.id.au
Wed Aug 13 02:25:46 UTC 2008


On Wed, Aug 13, 2008 at 3:56 AM, Martin Atkins <mart at degeneration.co.uk> wrote:
> The Net::OpenID::Consumer perl library as it currently stands will not
> support PAPE in 1.1-mode messages since the openid.ns.<alias> mechanism
> is only used in 2.0 mode. I'd like to change this to use the 2.0 scheme
> in 1.1 (with a special case for sreg) but I'm only comfortable doing
> that if there's a specification (or errata) that explicitly allows it.

Perhaps you could do something similar to the python-openid library?

If you are writing support for a new extension, you can use the
registerNamespaceAlias(uri, tag) function from the openid.message
module.

When parsing OpenID 1.x messages (which can be determined by checking
for the absence of openid.ns), it uses these namespace aliases to map
the prefixes to URIs.  Outside of the message parsing code, you can
work purely in terms of namespace URIs, which limits the amount of
code that needs to know about 1.x vs. 2.0.

James.



More information about the specs mailing list