Socket
Book a DemoInstallSign in
Socket

@fedikit/webfinger

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fedikit/webfinger

Building Blocks for Fediverse.

latest
Source
npmnpm
Version
0.0.1-alpha.7
Version published
Maintainers
1
Created
Source

@fedikit/webfinger

Implement Webfinger in a simple way.

Usage

/.well-known/webfinger (simpleWebfinger)
import {
  simpleWebfinger,
  type SimpleWebfingerHandler,
} from '@fedikit/webfinger'
import { Hono } from 'hono'

const app = new Hono()

const handler = ({ user, host }) => `https://${host}/users/${user}`

// GET https://example.com/.well-known/webfinger?resource=acct:carol@example.com
// {
//   "subject": "acct:carol@example.com",
//   "aliases": ["https://example.com/users/carol"],
//   "links": [
//     {
//       "href": "https://example.com/users/carol",
//       "rel": "http://webfinger.net/rel/profile-page",
//       "type": "text/html"
//     },
//     {
//       "href": "https://example.com/users/carol",
//       "rel": "self",
//       "type": "application/activity+json"
//     }
//   ]
// }
app.get(
  '.well-known/webfinger',
  () => simpleWebfinger(handler),
)

FAQs

Package last updated on 19 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts