Server configuration reader.
A config file maps bearer-token fingerprints to stable principal IDs and fork IDs. Raw tokens never appear in the config — only their SHA-256 hex digest.
EDN format:
{:state-dir "path/to/authority" :forks-dir "path/to/forks" :principals {"alice" {:token-sha256 "abcdef..." :fork-id "alice" :lifecycle :durable} "bob" {:token-sha256 "012345..." :fork-id "bob" :lifecycle :durable}}}
All paths are resolved relative to the config file's parent directory. Unknown top-level keys are rejected (closed schema). :state-dir is ALWAYS required — even all-leased configs need durable authority.
Server configuration reader.
A config file maps bearer-token fingerprints to stable principal IDs and
fork IDs. Raw tokens never appear in the config — only their SHA-256 hex
digest.
EDN format:
{:state-dir "path/to/authority"
:forks-dir "path/to/forks"
:principals
{"alice" {:token-sha256 "abcdef..."
:fork-id "alice"
:lifecycle :durable}
"bob" {:token-sha256 "012345..."
:fork-id "bob"
:lifecycle :durable}}}
All paths are resolved relative to the config file's parent directory.
Unknown top-level keys are rejected (closed schema).
:state-dir is ALWAYS required — even all-leased configs need durable authority.(lookup-principal config raw-token)Given a raw bearer token, hash it and find the matching principal entry. Returns [principal-id principal-map] or nil if no match.
Given a raw bearer token, hash it and find the matching principal entry. Returns [principal-id principal-map] or nil if no match.
(read-config path)Read and validate a server config from an EDN file.
Read and validate a server config from an EDN file.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |