Authorized fetch, anyone?

This commit is contained in:
Steffo 2024-10-21 06:30:45 +02:00
parent 92d543dbbd
commit 58d4e3b8a4
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0

View file

@ -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<ContextData>, _handle: string, _signedKey: unknown, _signedKeyOwner: unknown): Promise<boolean> {
return true
}
async #followHandler(ctx: Context<ContextData>, follow: Follow) {
l.info`Handling follow request: ${follow}`