Skip to content

v0.18.0 (directory v0.4.0)

Choose a tag to compare

@saravenpi saravenpi released this 10 Nov 18:37
· 25 commits to main since this release

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 of kit.Mount, and no existing route, status code, cookie, CSRF
    rule, /auth/config body or pg.Schema changes. It registers GET /me/invitations, which
    reads the signed-in user's Registre subject from the identity store (the row filed under the
    issuer), asks Registre's GET /api/directory/invitations with 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) is ErrUnavailable. One call is bounded by
    InvitationsTimeout (2 seconds) whatever the caller's deadline. An empty subject is
    ErrNoSubject and sends nothing.
  • The root module now requires directory; its replace ./directory serves this repository's
    builds and is ignored by consumers, so directory/v0.4.0 is tagged first.

Changed

  • Licence: porte is now licensed under MIT (see LICENSE); before this, the repository carried no licence. The nested directory, forfait and mcpauth modules carry the same file.