Subject: [apps-discuss] Fwd: Draft for apps discuss

From: John Bradley <[email-masked]>
Date: Tue, 24 Apr 2012 23:08:38 -0300

Paul,

I am looking at how the flows in WF might work for openID.

Let's set aside the XML issue for the moment and focus on the JSON flow.

Please correct anything I get wrong.

The openID Connect defines a relation of http://openid.net/specs/connect/issuer

WF allows for a JSON host-meta that takes two parameters, "resource" and "rel"

An example request and response (line-brakes for readability)

GET /.well-known/host-meta.json
     ?resource=[email-masked]
     &rel=http%3A%2F%2Fopenid.net%2Fspecs%2Fconnect%2F1.0%2Fissuer HTTP/1.1
 Host: example.com

   HTTP/1.1 200 OK

   Access-Control-Allow-Origin: *
   Content-Type: application/json; charset=UTF-8

   {
     "subject" : "[email-masked]",
     "links" :
     [
       {
         "rel" : "http://openid.net/specs/connect/issuer",
         "href" : "https://server.example.com"
       }
     ]
   }

If the host can't support rewrite rules or scripts the exchange would look like:

GET /.well-known/host-meta.json
     ?resource=[email-masked]
     &rel=http%3A%2F%2Fopenid.net%2Fspecs%2Fconnect%2F1.0%2Fissuer HTTP/1.1
 Host: example.com

HTTP/1.1 200 OK
   Access-Control-Allow-Origin: *
   Content-Type: application/json; charset=UTF-8
   {
     "expires" : "2012-03-13T20:56:11Z",
     "links" :
     [
       {
         "rel" : "lrdd",
         "type" : "application/json",
         "template" :
           "https://example.com/lrdd/?format=json&resource={uri}"
       }

GET /lrdd/
     ?format=json
     &resource=[email-masked]
 Host: example.com

HTTP/1.1 200 OK

   Access-Control-Allow-Origin: *
   Content-Type: application/json; charset=UTF-8

   {
     "subject" : "[email-masked]",
     "links" :
     [
       {
         "rel" : "http://openid.net/specs/connect/issuer",
         "href" : "https://server.example.com"
       },
       {
         "rel" : "http://webfinger.net/rel/avatar",
         "href" : "http://example.com/~joe/joe.jpg"
       }

     ]
   }

I can't find a template parameter for "rel".  The host-meta spec allows for extension but it is missing.

What if the server wants to support filtering on del but can't support it in the root for some reason?

Is it possible to have a template like:
"https://example.com/lrdd/?format=json&resource={uri}&rel={rel}"

That simple addition may solve a number of problems for openID.

John B.