Additional settings for the actor dispatcher.
const federation = createFederation<void>({ ... }); federation .setActorDispatcher("/users/{identifier}", async (ctx, identifier) => { // ... }) .setKeyPairsDispatcher(async (ctxData, identifier) => { // ... });
setKeyPairsDispatcher(dispatcher: ActorKeyPairsDispatcher<TContextData>): ActorCallbackSetters<TContextData>
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.
authorize(predicate: AuthorizePredicate<TContextData>): ActorCallbackSetters<TContextData>
Specifies the conditions under which requests are authorized.