Extensions key prefix
Martin Atkins
mart at degeneration.co.uk
Wed Mar 14 07:54:37 UTC 2007
Rowan Kerr wrote:
[snip]
> i.e. While the spec for Attribute Exchange uses "openid.ax" for its
> message keys, and Simple Reg 1.1 uses "openid.sreg", in reality the
> keys received in a message are determined by whatever comes after the
> key openid.ns.* where the value is the URI of the extension putting
> data into those keys.
>
> So, openid.ns.ax = http://openid.net/srv/ax/1.0 implies
> openid.ax.required.
>
> But it could just as easily be openid.ns.foo = http://openid.net/srv/
> ax/1.0
> in which case, your sreg values would be in keys named openid.foo.*
>
I was aware of this previously, but now that you've spelled it out a
thought has occured to me...
Most frameworks model the query string arguments as an associative
array, so it's useful to know what key you're expecting ahead of time.
With the above naming scheme, it seems to me that you'd have to search
the entire query argument map for a key,value pair where the value is
the URL you're looking for and the key matches /^openid.ns.(\w+)$/.
This seems sub-optimal, but I must admit I don't know what else to
suggest. While putting the URL in the "key" and the prefix in the value
would not be invalid, it'd be troublesome in PHP where for historical
reasons it mangles anything that wouldn't be a valid variable name.
Or am I missing something?
More information about the specs
mailing list