Expand description
The console’s HTTP API (RFC-108 D5 and D9) and the rules for where it may listen.
Structs§
- Serve
Config - Where and how
tuff console servelistens. - Server
Options - How the running server decides who may publish, and what the UI and
GET /api/v1/settingstell viewers about it.
Functions§
- check_
bind - The bind rules of D5. A loopback address needs nothing. Any other
address needs
--public-read, because viewing is not authenticated, and at least one publish credential (a key or a trust), because publishing is authenticated. A demo needs no credential: its data is generated and in memory, and with none configured every publish is refused, so it is read only. - router
- The API routes. Publishing needs a live key or a verified OIDC token in
Authorization: Bearerwhenrequire_keyis set, when a trust is configured, and whenever at least one key exists, on any address. With none of those, anyone who can connect may publish. - run
- Open the store, apply the bind rules, and serve until interrupted.
on_readyreceives the bound address once the server accepts connections. - serve
- Serve
router(store, options)onlisteneruntilshutdowncompletes.