Auth 2.0 Extensions: Namespace Prefixes

Martin Atkins mart at degeneration.co.uk
Mon Apr 30 19:48:29 UTC 2007


As currently defined, an extension has a global namespace URI as well as 
a request-local alias/prefix. For an extension with the namespace 
http://example.com/blah that has a field "foo", the following fields are 
to be sent:

     openid.ns.blah=http://example.com/blah
     openid.blah.foo=bar

It seems to me that the only way to discover the extension namespaces 
used in a particular message is to iterate over all keys looking for 
openid.ns.(\w+) and then see if the value matches.

This seems ugly since usually webapps deal with such arguments as a 
dictionary structure, and use dictionary dicipline while interrogating 
the values.

If we added an extra field:
     openid.extensions=blah,sreg,ax

then the extensions used in a message would be accessible by splitting 
that field on its commas and then accessing openid.ns.whatever for each one.

It's still not ideal, of course; it'd be better if the full namespace 
URI were included in the "key" part of a (key,value) pair, but many 
frameworks[1] can't deal with wacky punctuation characters in the key.




[1] I'm looking at you, PHP.




More information about the specs mailing list