(composite catalogs)Try multiple catalogs in order; return the first non-nil record.
Try multiple catalogs in order; return the first non-nil record.
(context-fn-catalog f)Wrap an arbitrary (fn [uuid context] -> record|nil).
Wrap an arbitrary (fn [uuid context] -> record|nil).
(edn-file-catalog path)EDN-backed catalog for prototyping and small, trusted deployments. File format: [{:user-id #uuid "..." :hash-hex "..." :rotation-version 1 ...} ...] Reads and parses the entire file on every lookup, so it is intended only for low-traffic endpoints with a small, trusted, correctly shaped catalog. Automatically converts hex strings to byte arrays for the crypto engine. Use a custom TokenCatalog backed by production storage for larger or untrusted catalogs.
EDN-backed catalog for prototyping and small, trusted deployments.
File format: [{:user-id #uuid "..." :hash-hex "..." :rotation-version 1 ...} ...]
Reads and parses the entire file on every lookup, so it is intended only for
low-traffic endpoints with a small, trusted, correctly shaped catalog.
Automatically converts hex strings to byte arrays for the crypto engine.
Use a custom TokenCatalog backed by production storage for larger or
untrusted catalogs.(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 |