Works with
This package works with Node.js, Deno, Bun
License
MIT
•
Downloads9,010/wk
•
Published4 days ago (2.3.6)
An ActivityPub/fediverse server framework
- @fedify/fedify
- default
- ActorCallbackSetters
Additional settings for the actor dispatcher.
const federation = createFederation<void>({ ... }); federation .setActorDispatcher("/users/{identifier}", async (ctx, identifier) => { // ... }) .setKeyPairsDispatcher(async (ctxData, identifier) => { // ... });
Type Parameters
Methods
Sets the key pairs dispatcher for actors.
Sets the callback function that maps a WebFinger username to the corresponding actor's identifier. If it's omitted, the identifier is assumed to be the same as the WebFinger username, which makes your actors have the immutable handles. If you want to let your actors change their fediverse handles, you should set this dispatcher.
Sets the callback function that maps a WebFinger query to the corresponding
actor's identifier or username. If it's omitted, the WebFinger handler
only supports the actor URIs and acct: URIs. If you want to support
other queries, you should set this dispatcher.
Maps a fixed path to a sentinel identifier. It is useful for exposing
a single, instance-level actor at a fixed path, such as /actor for
a relay or /bot for a bot.
Specifies the conditions under which requests are authorized.