Re: [webfinger] Webfinger extension for Sinatra

Eric Mill <eric@konklone.com> Tue, 15 October 2013 19:44 UTC

Return-Path: <konklone@gmail.com>
X-Original-To: webfinger@ietfa.amsl.com
Delivered-To: webfinger@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2D58011E8186 for <webfinger@ietfa.amsl.com>; Tue, 15 Oct 2013 12:44:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level:
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, NO_RELAYS=-0.001]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pLmAijzSi2Z3 for <webfinger@ietfa.amsl.com>; Tue, 15 Oct 2013 12:44:52 -0700 (PDT)
Received: from mail-ea0-x234.google.com (mail-ea0-x234.google.com [IPv6:2a00:1450:4013:c01::234]) by ietfa.amsl.com (Postfix) with ESMTP id 0EB3211E81E9 for <webfinger@ietf.org>; Tue, 15 Oct 2013 12:44:43 -0700 (PDT)
Received: by mail-ea0-f180.google.com with SMTP id h10so4230306eaj.11 for <webfinger@ietf.org>; Tue, 15 Oct 2013 12:44:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=kw++x+RNRHRkdN08Rd3cASl5CZLEueXQAPWg9Jq0JWA=; b=X/41we6XvLnVc+BX43ZIFUjWedg8Y7M0YbLSgkv0DlGP6mx2930qIbUSY18vW628Ap F85X7e7RiPrIGeyZsv2Ke0ItVAnGaiitCSXUo71L2ORnXknui51A5RreaaEjlV/zlMTf fjkaU+IhjQGZfTm1fd7t9QO/8q4ED3ihOD1IrCt1ca6sNloNM+s7P7lThQ27a5UYpyc4 dCaswBcwvLjhzALq5l8BmFv+hHXUOuOPf5hJ6ncIQQwTYe2LrvneAzcCjhtZ0PFdF6wm N9aYWTxF+Aub0gTQA0dSERR9RS7SIaqayoNpGx1RX8UYqGqtnNFya1JU/sIGBytX/wni 5zXg==
X-Received: by 10.14.4.1 with SMTP id 1mr3192873eei.21.1381866283026; Tue, 15 Oct 2013 12:44:43 -0700 (PDT)
MIME-Version: 1.0
Sender: konklone@gmail.com
Received: by 10.223.167.69 with HTTP; Tue, 15 Oct 2013 12:44:02 -0700 (PDT)
In-Reply-To: <525D94BB.5020206@packetizer.com>
References: <CANBOYLVDDc8yx52oA1dXrD6wThp+AzWy3mgXhYMNoQO7Y8ZaDQ@mail.gmail.com> <525D94BB.5020206@packetizer.com>
From: Eric Mill <eric@konklone.com>
Date: Tue, 15 Oct 2013 15:44:02 -0400
X-Google-Sender-Auth: UhzmN_BUWCzIhA5kdKQArRZEwao
Message-ID: <CANBOYLVVJ6p0haYFkA=pJODbMTKWBvDW71Mf6==VAm3o-5gO4A@mail.gmail.com>
To: "Paul E. Jones" <paulej@packetizer.com>
Content-Type: multipart/alternative; boundary="047d7b66f285ed4fdd04e8ccd04f"
Cc: "webfinger@ietf.org" <webfinger@ietf.org>
Subject: Re: [webfinger] Webfinger extension for Sinatra
X-BeenThere: webfinger@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Discussion of the Webfinger protocol proposal in the Applications Area <webfinger.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/webfinger>, <mailto:webfinger-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/webfinger>
List-Post: <mailto:webfinger@ietf.org>
List-Help: <mailto:webfinger-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/webfinger>, <mailto:webfinger-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 15 Oct 2013 19:44:53 -0000

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 <paulej@packetizer.com>wrote:

>  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:
>
> 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:eric@konklone.com>
> .
>
>  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 "eric@konklone.com" => {
>   name: "Eric Mill",
>   website: "https://konklone.com"}
>
>  And this is what the endpoint will produce:
>
> {
>   "subject": "eric@konklone.com",
>   "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>
>
>
> _______________________________________________
> webfinger mailing listwebfinger@ietf.orghttps://www.ietf.org/mailman/listinfo/webfinger
>
>
>
> _______________________________________________
> webfinger mailing list
> webfinger@ietf.org
> https://www.ietf.org/mailman/listinfo/webfinger
>
>


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