Subject: [webfinger] Webfinger extension for Sinatra

From: Eric Mill <[email-masked]>
Date: Mon, 14 Oct 2013 16:31:56 -0400

Hi all,

I just wrote an extension for Sinatra, a popular Ruby-based microframework,
that adds a Webfinger endpoint for a given email address and set of
metadata:
https://github.com/konklone/sinatra-webfinger#a-webfinger-plugin-for-sinatra

The idea here is to lower the barrier to adding a Webfinger endpoint for
one's email, for people running Sinatra apps on their domain (like me). I'm
using this on my blog
here<https://konklone.com/.well-known/webfinger?resource=acct:[email-masked]>
.

It does a couple things I'd like your reaction to. For one, it auto-decides
whether data should be in "properties" or "links" based on whether the
value is a URL. For two, it lets you specify common short strings as keys,
and does the mapping to a URI for you, when there is one.

So this is the Ruby code:

webfinger "[email-masked]" => {
  name: "Eric Mill",
  website: "https://konklone.com"}

And this is what the endpoint will produce:

{
  "subject": "[email-masked]",
  "properties": {
    "http://schema.org/name": "Eric Mill"
  },
  "links": [
    {
      "rel": "http://webfinger.net/rel/profile-page",
      "href": "https://konklone.com"
    }
  ]}

I'm doing the mapping from field name to URI here:
https://github.com/konklone/sinatra-webfinger/blob/master/data/urns.yml based
on Will Norris' and Paul Jones' collections of URIs.

Next, I'd like to tackle an extension for Jekyll, and a generator for a
straight static file you can serve with a couple of lines in
nginx/Apache/S3. I'll probably follow the approach I'm taking here in
sinatra-webfinger as closely as possible, so, feedback very welcome!

-- Eric

-- 
konklone.com | @konklone <https://twitter.com/konklone>

---

From: "Paul E. Jones" <[email-masked]>
Date: Tue, 15 Oct 2013 15:17:15 -0400

Cool! This looks like a simple way to map most information.  Note that, 
while properties are defined as "strings", there is nothing illegal 
about putting a a URI inside.  Just to avoid any possibility of error, 
might it be better to name properties like "name_property" or 
something?  If the tag has _property at the end, then put it in properties.

Paul

On 10/14/2013 4:31 PM, Eric Mill wrote:
> Hi all,
>
> I just wrote an extension for Sinatra, a popular Ruby-based 
> microframework, that adds a Webfinger endpoint for a given email 
> address and set of metadata:
> The idea here is to lower the barrier to adding a Webfinger endpoint 
> for one's email, for people running Sinatra apps on their domain (like 
> me). I'm using this on my blog here 
> <https://konklone.com/.well-known/webfinger?resource=acct:[email-masked]>.
>
> It does a couple things I'd like your reaction to. For one, it 
> auto-decides whether data should be in "properties" or "links" based 
> on whether the value is a URL. For two, it lets you specify common 
> short strings as keys, and does the mapping to a URI for you, when 
> there is one.
>
> webfinger  "[email-masked]  <mailto:[email-masked]>"  =>  {
>    name:  "Eric Mill",
>    "subject":  "[email-masked]  <mailto:[email-masked]>",
>    "properties":  {
>    ]
> Next, I'd like to tackle an extension for Jekyll, and a generator for 
> a straight static file you can serve with a couple of lines in 
> konklone.com <http://konklone.com> | @konklone 
> <https://twitter.com/konklone>
>
>
> _______________________________________________
> webfinger mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/webfinger

---

From: Eric Mill <[email-masked]>
Date: Tue, 15 Oct 2013 15:44:02 -0400

Yeah, I could add an override option to force the key into one bucket or
another - I added a
ticket<https://github.com/konklone/sinatra-webfinger/issues/12> for
it and sketched out what the syntax might look like.

On Tue, Oct 15, 2013 at 3:17 PM, Paul E. Jones <[email-masked]>wrote:

> while properties are defined as "strings", there is nothing illegal about
> putting a a URI inside.  Just to avoid any possibility of error, might it
> be better to name properties like "name_property" or something?  If the tag
> has _property at the end, then put it in properties.
>
> Paul
>
>
> microframework, that adds a Webfinger endpoint for a given email address
> and set of metadata:
>
> using this on my blog here<https://konklone.com/.well-known/webfinger?resource=acct:[email-masked]>
> .
>
> auto-decides whether data should be in "properties" or "links" based on
> whether the value is a URL. For two, it lets you specify common short
> strings as keys, and does the mapping to a URI for you, when there is one.
>
> webfinger mailing [email-masked]://www.ietf.org/mailman/listinfo/webfinger
>
>
>