[OpenID] A Simple host-meta implementation using Atom

Santosh Rajan santrajan at gmail.com
Sat Nov 14 05:47:04 UTC 2009


FWIW, even though i don't see a practical application, it should be worth a
look for the idea's inherent.

<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">

  <id>acct:host-meta @ example.com</id>

  <link rel="alternate"
    type="application/atom+xml"
    href="http://example.com/.well-known/host-meta"/>

  <link rel="http://specs.openid.net/auth/2.0/server"
    href="https://www.exampleprovider.com/endpoint"/>

  <link rel="http://ietf.org/service/resolve/xrd"
    type="application/xrd+xml"
    href="http://example.com/getxrd"/>

</entry>

You can see above an Atom entry document used for the host-meta.

The first element is the id element. Here we give an identity to the
host-meta. I have chosen the acct scheme instead of http because the atom
spec specifies that you SHOULD use a urn instead of a http uri. However I
think it is easy to give a "valid" reason to use http, and i could just as
well have used a http uri for the identity.

The first link element (atom specific) points to the actual document.

The second link element points to the host wide openid provider.

The third link element points to a service that maps a uri to an XRD
available on the server. This is explained in a previous post of mine which
I have copied below.

On Sat, Nov 14, 2009 at 7:48 AM, Santosh Rajan <santrajan at gmail.com> wrote:

> One of the purposes of the host-meta is to map a given URI to its XRD
> available on the server. Currently this is done by using a URITemplate.
> <URITemplate>http://example.com/getxrd?q={uri}<http://example.com/getxrd?q=%7Buri%7D>
> <URITemplate>
>
> Instead can the host-meta define a resolver service on the host, that
> returns an XRD given the Subject URI? eg. The host-meta can define a service
> on the server that accepts a GET or POST request with a single parameter
> passed whose key is "subject", and "value" is the subject URI to be
> resolved. In this case we only need a URI to the service on the server and
> can be written like this.
>
> <link rel="http://ietf.org/service/resolve/xrd"
>     type="application/xrd+xml"
>     href="http://example.com/getxrd"/>
>
> (the rel value is just an example)
>
> Advantages of this being
> 1) No need for template and template mapping
> 2) The idea is consistent with the host-meta being an aggregator of the
> XRD's available on the host.
>
> Any reason this could be a bad idea?
>
> --
> http://hi.im/santosh
>
>
>


-- 
http://hi.im/santosh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openid.net/pipermail/openid-general/attachments/20091114/a01c6d8c/attachment.htm>


More information about the general mailing list