WebFinger Web Handler
The WebFinger (webfinger.js) Handler provides basic WebFinger (RFC7033) support, enabling servers such as those participating in the Mastodon Fediverse to discover basic information about a user.
Supported Features
Section titled “Supported Features”- profile-page
- ActivityStream URI via rel of
selfand of typeapplication/activity+json - Subscription URI template via rel of
http://ostatus.org/schema/1.0/subscribe
Configuration
Section titled “Configuration”By default, the WebFinger handler is not enabled. To enable, at a minimum set contentServers.web.handlers.webFinger.enabled to true in config.hjson:
contentServers: { web: { handlers: { webFinger: { enabled: true // wow, much nest! } } }}Configuration Keys
Section titled “Configuration Keys”| Key | Description |
|---|---|
enabled | Boolean. Set to true to enable WebFinger services |
profileTemplate | String. Provide a fully qualified, or relative to static root path to a template file for fetching profile information. See Profile Template for more information. |
Profile Template
Section titled “Profile Template”A profile template file can offer flexibility as to what information, the format, and MIME type served by the profile-page WebFinger query. Set the profileTemplate key in your webFinger configuration block to a path to serve as the template. The MIME type will be determined by the file’s extension:
contentServers: { web: { handlers: { webFinger: { enabled: true profileTemplate: './wf/fancy-profile.html' } } }}Example Session
Section titled “Example Session”# WebFinger query> http get 'https://xibalba.vip/.well-known/webfinger?resource=acct:NuSkooler@xibalba.vip'HTTP/1.1 200 OKConnection: keep-aliveContent-Length: 558Content-Type: application/jrd+jsonDate: Mon, 02 Jan 2023 03:36:20 GMTKeep-Alive: timeout=5
{ "aliases": [ "https://xibalba.vip/_enig/wf/@NuSkooler", "https://xibalba.vip/_enig/ap/users/NuSkooler" ], "links": [ { "href": "https://xibalba.vip/_enig/wf/@NuSkooler", "rel": "https://webfinger.net/rel/profile-page", "type": "text/plain" }, { "href": "https://xibalba.vip/_enig/ap/users/NuSkooler", "rel": "self", "type": "application/activity+json" }, { "rel": "http://ostatus.org/schema/1.0/subscribe", "template": "http://xibalba.vip/_enig/ap/authorize_interaction?uri={uri}" } ], "subject": "acct:NuSkooler@xibalba.vip"}# Now we can fetch the profile> http get 'https://xibalba.vip/_enig/wf/@NuSkooler'HTTP/1.1 200 OKConnection: keep-aliveContent-Length: 116Content-Type: text/plainDate: Mon, 02 Jan 2023 03:41:19 GMTKeep-Alive: timeout=5
User information for: NuSkooler
Real Name: Bryan AshbyLogin Count: 432Affiliations: ENiGAchievement Points: 405