0.0.1-alpha.7 • Published 4 months ago

@fedikit/webfinger v0.0.1-alpha.7

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

@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),
)
0.0.1-alpha.7

4 months ago

0.0.1-alpha.6

6 months ago

0.0.1-alpha.4

6 months ago

0.0.1-alpha.3

6 months ago