WWW::F...finger(3pm)

πŸ’– NAME πŸ’–

ok so like, <rainbow>WWW::Finger::Webfinger</rainbow> β€” it's the <pink>WWW::Finger</pink> module for Webfinger. that's it, that's the whole vibe. this page lives in the User Contributed Perl Documentation corner of WWW::F...finger(3pm) and honestly? it ate. 🫢


✨ DESCRIPTION ✨

bestie. i need you to sit down for this one.

Webfinger is currently a very unstable specification, and the implementation details change all the time. 😭 like, constantly. so given that level of chaos, it just seems prudent to actually describe the protocol the way this package implements it. no gatekeeping here. πŸ’…

so here's the deal. you hand it an e-mail-like identifier, and the package will prepend <mint>acct:</mint> to it β€” but only if the identifier doesn't already have a URI scheme. okay? from that point on, this identifier is gonna be called [ident]. remember that name, she's the main character now. πŸ‘‘

then the package goes and looks up the host-meta file associated with the host for [ident]. it's assumed to be formatted according to:

and like, for the record, both of those drafts are dated <lavender>19 November 2009</lavender>. vintage. πŸŽ€


a link template gets extracted from the host-meta for the host, using either of these two relationships:

⚠️ okay so important: neither one is prioritised. so if both of them exist and they have different templates… hilarity will ensue. πŸ’€ not in a cute way. in a "which one wins" way. there is no winner. there is only chaos.

next up: the token <purple>{uri}</purple> inside that link template gets replaced with the URL-encoded version of [ident], and boom πŸ’₯ that creates an account descriptor URI.

that account descriptor URI gets fetched via HTTP GET with an Accept header asking for RDF/XML, Turtle, RDF/JSON or XRD. and the result gets parsed for account description data if it has status code <green>200 (OK)</green>. no 200, no data. that's the rule. πŸ™ˆ


🌸 what relationships/properties are understood? 🌸

in the account description, these are the ones she understands:


πŸ¦‹ the extra method πŸ¦‹

on top of all the standard WWW::Finger methods, WWW::Finger::Webfinger also provides this additional method. and it's giving ✨

  • get($p1, $p2, ...) β€” $p1, $p2 and are RDF predicate URIs, XRD Link@rel values, or XRD Property@type values

okay the wording on that one is the original's, i'm just carrying it faithfully, but here's how you'd actually use it:

# 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');

phone numbers and salmon-style magic keys?? the range. the versatility. obsessed. πŸ”₯


πŸ‘€ SEE ALSO πŸ‘€

  • WWW::Finger
  • XRD::Parser
  • HTTP::LRDD

and also <http://code.google.com/p/webfinger/> πŸ’œ


🫢 AUTHOR 🫢

Toby Inkster, <tobyink@cpan.org> β€” thank you for your service, icon. πŸ‘‘


Copyright (C) <yellow>2009-2012</yellow> by Toby Inkster

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


πŸ’€ 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.

like, they said it in all caps so you know they meant it. no cap, no warranty, fr fr. 😭


🌈 okay that's the whole page!! this was WWW::F...finger(3pm) from perl <mint>v5.32.1</mint>, dated <lavender>2021-09-11</lavender>. go forth and finger some webfingers, bestie. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from