Liking cljdoc? Tell your friends :D

turvata.catalog


compositeclj

(composite catalogs)

Try multiple catalogs in order; return the first non-nil record.

Try multiple catalogs in order; return the first non-nil record.
sourceraw docstring

edn-file-catalogclj

(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.
sourceraw docstring

fn-catalogclj

(fn-catalog f)

Wrap an arbitrary (fn [uuid] -> record|nil).

Wrap an arbitrary (fn [uuid] -> record|nil).
sourceraw docstring

in-memory-catalogclj

(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.
sourceraw docstring

TokenCatalogcljprotocol

lookup-recordclj

(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:

  • :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.

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.
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close