(composite catalogs)Try multiple catalogs in order; return the first non-nil record.
Try multiple catalogs in order; return the first non-nil record.
(edn-file-catalog path)EDN-backed catalog. File format: [{:user-id #uuid "..." :hash-hex "..." :rotation-version 1 ...} ...] Note: reloads the file on each call; intended for low traffic endpoints. Automatically converts hex strings to byte arrays for the crypto engine.
EDN-backed catalog.
File format: [{:user-id #uuid "..." :hash-hex "..." :rotation-version 1 ...} ...]
Note: reloads the file on each call; intended for low traffic endpoints.
Automatically converts hex strings to byte arrays for the crypto engine.(fn-catalog f)Wrap an arbitrary (fn [uuid] -> record|nil).
Wrap an arbitrary (fn [uuid] -> record|nil).
(in-memory-catalog uuid->record)Catalog backed by an in-memory map keyed by user-id UUIDs. Provide {<uuid> -> <db-row-map>}. Useful for testing.
Catalog backed by an in-memory map keyed by user-id UUIDs.
Provide {<uuid> -> <db-row-map>}. Useful for testing.(lookup-record this user-id-uuid)(lookup-record this user-id-uuid context)Returns the database record map for the given user-id UUID, or nil if not found. The returned map must contain:
Context is an optional map (e.g. ring request, log data) for auditing.
Returns the database record map for the given user-id UUID, or nil if not found. The returned map must contain: - :hash (byte array) - :rotation-version (integer) - :expires-at (java.time.Instant or nil) Optional keys for zero-downtime rotation: - :prev-hash (byte array) - :grace-period-expires-at (java.time.Instant) Context is an optional map (e.g. ring request, log data) for auditing.
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 |