DESCRIPTION

Webfinger is currently a very unstable specification, with implementation details changing all the time. Given this instability, it seems prudent to describe the protocol, as implemented by this package.

Given an e-mail-like identifier, the package will prepend \*(L"acct:\*(R" to it, assuming that the identifier doesn't already have a \s-1URI\s0 scheme. This identifier will now be called [ident].

The package looks up the host-meta file associated with the host for [ident]. It is assumed to be formatted according to the draft-hammer-hostmeta-05 Internet Draft http://tools.ietf.org/html/draft-hammer-hostmeta-05 <http://tools.ietf.org/html/draft-hammer-hostmeta-05> and \s-1XRD\s0 Working Draft 10 <http://www.oasis-open.org/committees/download.php/35274/xrd-1.0-wd10.html>. Both these drafts are dated 19 November 2009.

A link template will be extracted from the host-meta for the host using either of the following two relationships: <http://lrdd.net/rel/descriptor>, <http://www.iana.org/assignments/relation/lrdd>. (Neither is prioritised, so if both exist and have different templates, hilarity will ensue.)

The token \*(L"{uri}\*(R" in the link template will be replaced with the URL-encoded version of [ident] to create an account descriptor \s-1URI\s0.

The account descriptor \s-1URI\s0 is fetched via \s-1HTTP\s0 \s-1GET\s0 with an Accept header asking for \s-1RDF/XML\s0, Turtle, \s-1RDF/JSON\s0 or \s-1XRD\s0. The result is parsed for account description data if it has status code 200 (\s-1OK\s0).

The following relationships/properties are understood in the account description:

  • http://xmlns.com/foaf/0.1/name

  • http://xmlns.com/foaf/0.1/homepage

  • http://webfinger.net/rel/profile-page

  • http://xmlns.com/foaf/0.1/weblog

  • http://xmlns.com/foaf/0.1/mbox

  • http://webfinger.net/rel/avatar

  • http://xmlns.com/foaf/0.1/img

  • http://xmlns.com/foaf/0.1/depiction

  • http://ontologi.es/sparql#endpoint

As well as the standard WWW::Finger methods, WWW::Finger::Webfinger provides this additional method: $p1, $p2 and are \s-1RDF\s0 predicate URIs, \s-1XRD\s0 Link@rel values, or \s-1XRD\s0 Property@type values

  # Returns phone numbers...
  $finger->get('http://xmlns.com/foaf/0.1/phone',
               'http://rdf.data-vocabulary.org/#tel');

  # Salmon-style magic keys
  $finger->get('magic-public-key');

RELATED TO WWW::Finger::Webfinger…

WWW::Finger, XRD::Parser, \s-1HTTP::LRDD\s0.

<http://code.google.com/p/webfinger/>.

AUTHOR

Toby Inkster, <[email protected]>

COPYRIGHT AND LICENCE

Copyright (C) 2009-2012 by Toby Inkster

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

DISCLAIMER OF WARRANTIES

\s-1THIS\s0 \s-1PACKAGE\s0 \s-1IS\s0 \s-1PROVIDED\s0 \*(L"\s-1AS\s0 \s-1IS\s0\*(R" \s-1AND\s0 \s-1WITHOUT\s0 \s-1ANY\s0 \s-1EXPRESS\s0 \s-1OR\s0 \s-1IMPLIED\s0 \s-1WARRANTIES\s0, \s-1INCLUDING\s0, \s-1WITHOUT\s0 \s-1LIMITATION\s0, \s-1THE\s0 \s-1IMPLIED\s0 \s-1WARRANTIES\s0 \s-1OF\s0 \s-1MERCHANTIBILITY\s0 \s-1AND\s0 \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0.