logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

WWW::Finger::Webfinger - WWW::Finger module for Webfinger

Author

       Toby Inkster, <tobyink@cpan.org>

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 "acct:" to it, assuming that the identifier
       doesn't already have a URI 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> and XRD 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 "{uri}" in the link template will be replaced with the URL-encoded version of [ident] to create
       an account descriptor URI.

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

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

       •   http://xmlns.com/foaf/0.1/namehttp://xmlns.com/foaf/0.1/homepagehttp://webfinger.net/rel/profile-pagehttp://xmlns.com/foaf/0.1/webloghttp://xmlns.com/foaf/0.1/mboxhttp://webfinger.net/rel/avatarhttp://xmlns.com/foaf/0.1/imghttp://xmlns.com/foaf/0.1/depictionhttp://ontologi.es/sparql#endpoint

       As well as the standard WWW::Finger methods, WWW::Finger::Webfinger provides this additional method:

       "get($p1, $p2, ...)"
           $p1, $p2 and are RDF predicate URIs, XRD Link@rel values, or XRD 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');

Disclaimer Of Warranties

       THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT  ANY  EXPRESS  OR  IMPLIED  WARRANTIES,  INCLUDING,  WITHOUT
       LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

perl v5.32.1                                       2021-09-11                        WWW::Finger::Webfinger(3pm)

Name

       WWW::Finger::Webfinger - WWW::Finger module for Webfinger

See Also

       WWW::Finger, XRD::Parser, HTTP::LRDD.

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

See Also