From 1cbd963c8a4820365a818da1245c860943bdf9f0 Mon Sep 17 00:00:00 2001 From: Dima Krasner Date: Sat, 9 Mar 2024 18:14:36 +0200 Subject: [PATCH] mention signature validation in README.md [skip ci] --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9e8cdddd..c4a24956 100644 --- a/README.md +++ b/README.md @@ -283,9 +283,9 @@ tootik may perform automatic actions in the name of the user: Requests from other servers are handled by [fed.Listener](https://pkg.go.dev/github.com/dimkr/tootik/fed#Listener), a HTTP server. -It uses [Resolver](https://pkg.go.dev/github.com/dimkr/tootik/fed#Resolver) to fetch public keys and validate requests, then inserts the received [Activity](https://pkg.go.dev/github.com/dimkr/tootik/ap#Activity) objects into `inbox`. +It extracts the signature and key ID from a request using [httpsig.Extract](https://pkg.go.dev/github.com/dimkr/tootik/httpsig#Extract), uses [Resolver](https://pkg.go.dev/github.com/dimkr/tootik/fed#Resolver) to fetch the public key if needed, validates the request using [Verify](https://pkg.go.dev/github.com/dimkr/tootik/httpsig#Signature.Verify) and inserts the received [Activity](https://pkg.go.dev/github.com/dimkr/tootik/ap#Activity) object into `inbox`. -In addition, it allows other servers to fetch public activity (like public posts) from `outbox`, so they can fetch some past activity by a newly-followed user. +In addition, [fed.Listener](https://pkg.go.dev/github.com/dimkr/tootik/fed#Listener) allows other servers to fetch public activity (like public posts) from `outbox`, so they can fetch some past activity by a newly-followed user. ``` ┌───────────────┐ @@ -307,7 +307,7 @@ In addition, it allows other servers to fetch public activity (like public posts ┃ ┃ │ fed.Resolver │ ┃ │ fed.Queue │ ┃ inbox.Queue ┃ │ ┃ ┃ └───────┬──────┘ ┃ └───────────┘ ┗━┳━┳━┳━━━━━━━┛ │ ┃ ┃ │ ┗━━━━━━━━━━━━━━━━━━━━━┛ ┃ ┃ │ - ┃ ┗━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┃ │ │ + ┃ ┗━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┃ │ ┗━━━━━━━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ │ └──────────────────────────────────────────────────┘ ``` @@ -340,7 +340,7 @@ Once inserted into `inbox`, [inbox.Queue](https://pkg.go.dev/github.com/dimkr/to │ │ │ fed.Resolver │ │ │ fed.Queue │ ┗━━━┥ inbox.Queue │ │ │ │ └───────┬──────┘ │ └───────────┘ └─┬─┬─┬───────┘ │ │ │ │ └─────────────────────┘ │ │ │ - │ └───────────┼───────────────────────────────────┘ │ │ │ + │ └───────────┼───────────────────────────────────┘ │ │ └─────────────────────┼─────────────────────────────────────┘ │ └──────────────────────────────────────────────────┘ ``` @@ -367,7 +367,7 @@ When a remote user replies in a thread started by a local user, the received [Ac │ │ │ fed.Resolver │ │ │ fed.Queue │ └───┤ inbox.Queue │ │ │ │ └───────┬──┰───┘ │ └───────────┘ └─┬─┬─┬──┰────┘ │ │ │ │ ┃ └─────────────────────┘ │ │ ┃ │ - │ └───────────┼──╂────────────────────────────────┘ │ ┃ │ │ + │ └───────────┼──╂────────────────────────────────┘ │ ┃ │ └─────────────────────┼──╂──────────────────────────────────┘ ┃ │ └──╂─────────────────────────────────────╂─────────┘ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛