- Go 95.6%
- Makefile 4.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
An invitation creates the account pending and sends an enrolment link: the account cannot sign in until somebody accepts and sets credentials, so an invitation that is never taken up leaves nothing usable behind. Cancelling removes the pending account; resending issues a fresh link and kills the earlier ones; an accepted invitation cannot be cancelled, because the account is live and is managed as a user. The recovery address joins the user shapes: it also receives reset links, so losing the primary inbox does not mean losing the account, and it is never a sign-in identifier. |
||
| api | ||
| id | ||
| openapi | ||
| problem | ||
| .gitignore | ||
| .golangci.yml | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
burhlib
The contract between a burh identity provider and everything that talks to it.
openapi/burh.v1.yaml is the source of truth for the administration
and self-service API. The server's handlers and the Go client in this
repository are both generated from it, so the description cannot drift
away from the implementation. Anyone writing their own administration
interface, in any language, should start here.
Status
Early development. The document currently fixes the conventions every endpoint obeys; resources are being added as the server implements them.
What is here
| Path | Contents |
|---|---|
openapi/burh.v1.yaml |
The API description, OpenAPI 3.1 |
openapi |
The description, embedded for serving at runtime |
Conventions the description fixes
- Authentication is a bearer token: either an administrator's session token or an issued API token, whose scopes decide what it may do.
- Errors are
application/problem+jsonas defined by RFC 9457, with stableurn:burh:error:*types and arequest_idthat appears in the server's logs, traces and audit trail. - Collections page by opaque cursor, returning
next_cursoruntil they are exhausted. - Mutable resources carry an
ETag, and updates requireIf-Match, so two administrators cannot silently overwrite one another. - Rate limits are reported with the IETF
RateLimitheader fields.
Using it
go get forge.quinlan.cloud/joshquinlan/burhlib
import "forge.quinlan.cloud/joshquinlan/burhlib/openapi"
// openapi.Spec holds the description, ready to serve.
Building
Go 1.26 or newer, and golangci-lint on
PATH.
make check # lint, and validate the description
The test suite parses the description and fails if it is not valid OpenAPI 3.1, so a broken edit cannot be committed quietly.
Contributing
Changes to the description are changes to a published contract: they arrive with a reason, and breaking ones with a version. Otherwise the usual conventions apply, including Conventional Commits messages.
Licence
Apache-2.0. See LICENSE.