From 58d4e3b8a497e9de79023dfb511e2caad3120b88 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 21 Oct 2024 06:30:45 +0200 Subject: [PATCH] Authorized fetch, anyone? --- src/dv/dotinoVeloce.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dv/dotinoVeloce.ts b/src/dv/dotinoVeloce.ts index b172d2b..4843169 100644 --- a/src/dv/dotinoVeloce.ts +++ b/src/dv/dotinoVeloce.ts @@ -27,6 +27,7 @@ export class DotinoVeloce { .setActorDispatcher("/users/{identifier}", this.#actorHandler.bind(this)) .setKeyPairsDispatcher(this.#actorKeys.bind(this)) .mapHandle(this.#actorMapper.bind(this)) + .authorize(this.#authorizationHandler.bind(this)) this.federation .setInboxListeners("/inbox/{identifier}", "/inbox") @@ -248,6 +249,10 @@ export class DotinoVeloce { return result } + async #authorizationHandler(_ctx: Context, _handle: string, _signedKey: unknown, _signedKeyOwner: unknown): Promise { + return true + } + async #followHandler(ctx: Context, follow: Follow) { l.info`Handling follow request: ${follow}`