multiple URI elements per Service in XRDs

Martin Atkins mart at degeneration.co.uk
Thu Jan 19 21:05:42 UTC 2006


Josh Hoyt wrote:
> On 1/19/06, Martin Atkins <mart at degeneration.co.uk> wrote:
> 
>>Kevin Turner wrote:
>>
>>>On Thu, 2006-01-19 at 10:48 -0800, Johannes Ernst wrote:
>>>
>>>
>>>>Yes, but will they truly be on the same service? It appears to me
>>>>that if I have a choice of doing the same thing via HTTP and HTTPS,
>>>>I'd have a preference which one should be used, and thus they would
>>>>be in different service elements with different priority attributes?
>>>
>>>
>>>XRD allows for priority attributes on the URI element as well as on the
>>>Service element.  So I'd probably want to express that case as
>>>
>>>  <Service priority="10">
>>>    <Type>http://openid.net/signon/1.0</Type>
>>>    <URI priority="10">https://www.myopenid.com/server</URI>
>>>    <URI priority="15">http://www.myopenid.com/server</URI>
>>>    <openid:Delegate>http://keturn.myopenid.com/</openid:Delegate>
>>>  </Service>
>>>
>>>
>>>
>>How is one to interpret the priorities in this case?
>>Should an application first select a top-level service element based on
>>priority and then select a URI from within it based on priority?
>>
>>Also, how does the above example differ from the following?
>>
>>   <Service priority="10">
>>     <Type>http://openid.net/signon/1.0</Type>
>>     <URI priority="10">https://www.myopenid.com/server</URI>
>>     <openid:Delegate>http://keturn.myopenid.com/</openid:Delegate>
>>   </Service>
>>
>>   <Service priority="15">
>>     <Type>http://openid.net/signon/1.0</Type>
>>     <URI priority="15">http://www.myopenid.com/server</URI>
>>     <openid:Delegate>http://keturn.myopenid.com/</openid:Delegate>
>>   </Service>
>>
>>...or was this allowed purely as a document size optimization?
> 
> 
> It's functionally the same, assuming that there are no other service
> definitions inside that XRD. It does serve to make the document
> smaller, but I think that it also serves to make the intent clearer to
> a reader and make it easier to author.

Fair enough.

> 
> If you have something like:
> 
> <Service priority="20">
>   <URI priority="100">foo</URI>
>   <URI priority="200">bar</URI>
> </Service>
> 
> <Service priority="21">
>   <URI priority="10">baz</URI>
>   <URI priority="11">quux</URI>
> </Service>
> 
> then the URI elements should have this order:
> foo
> bar
> baz
> quux
> 

Hmm. So a higher priority is represented by a lower number? Isn't that a
bit crazy?

(or am I just reading your order backwards?)



More information about the yadis mailing list