feat: host project read endpoint for remote editors (#62, part 1) #69
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/v7-host-project-read"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First slice of #62 (editor-side outbound, full round-trip). The host side a remote editor's instance needs to read a project before editing it.
What it does
verifyGetSignature()(apCrypto) — verifies a body-less GET HTTP signature (requires(request-target)+datesigned and fresh) and returns the verified signer's actor URL.GET /ap/projects/:id— returns the project's entries as an APCollection. Public projects are open; private projects require a signed GET from an accepted remote editor on the project (401unsigned,403non-editor). Each entry is exposed with its canonical AP id (/ap/entries/:id) — the exact target anUpdateactivity uses (#10).Defederation interacts correctly for free: a blocked instance's editors were revoked (#61), so the authorization check fails →
403.Verification (dev server)
hostProjectRead.test.ts— 4 tests (forging real GET signatures): private needs a signature →401; invited editor signed →200with the entry + its AP id; non-editor signed →403; public served unsigned →200.api
tscclean; full API suite 211 passed (was 207).What's next in #62
PR 2 — the invite handshake (host sends an AP
Inviteon invite-remote; editor records it → "Shared with me"). PR 3 — editor remote-view + compose/edit → signedCreate/Updatedelivery. Cross-instance fetch/delivery is unit-tested per-side; true end-to-end needs two live instances.🤖 Generated with Claude Code