Repository navigation
v0.18.0 (directory v0.4.0)
Root module: v0.18.0; directory v0.4.0; forfait and mcpauth unchanged. Additive; no
migration. Both tags carry the MIT LICENSE files.
Added
kit.MountInvitations: pending space invitations for every app's user menu, written once.
Opt-in and additive: not part ofkit.Mount, and no existing route, status code, cookie, CSRF
rule,/auth/configbody orpg.Schemachanges. It registersGET /me/invitations, which
reads the signed-in user's Registre subject from the identity store (the row filed under the
issuer), asks Registre'sGET /api/directory/invitationswith the directory credentials, and
answers{"count": n, "href": url}: the one invitation's page when n is 1, else
{issuer}/spaces. Every failure answers 200{"count":0}and logs at warn, because a menu
badge must never fail a page. Answers, failures included, are cached per user for 60 seconds
in a bounded cache, and concurrent requests for one user share one Registre call: each call
costs Registre an argon2 verification, and under load it answers 503, which must not be
retried by every page.kit.InvitationsRoute()documents the route for tronc/apiref. See
docs/kit.md. The alternative was twenty hand-written copies of the same route.directory:Client.Invitations(ctx, subject). Reuses the client's Basic auth and issuer
handling. Strict about what it accepts: a count that disagrees with the list, trailing data, an
invitation without an id or with a link off the issuer's origin, or a body over
MaxInvitationsBytes(64 KiB) isErrUnavailable. One call is bounded by
InvitationsTimeout(2 seconds) whatever the caller's deadline. An empty subject is
ErrNoSubjectand sends nothing.- The root module now requires
directory; itsreplace ./directoryserves this repository's
builds and is ignored by consumers, sodirectory/v0.4.0is tagged first.
Changed
- Licence: porte is now licensed under
MIT(seeLICENSE); before this, the repository carried no licence. The nesteddirectory,forfaitandmcpauthmodules carry the same file.