Liking cljdoc? Tell your friends :D

turvata.catalog


compositeclj

(composite catalogs)

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

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

edn-file-catalogclj

(edn-file-catalog path)

EDN-backed catalog.

File format: a vector of maps [{:hashed "..." :user-id "alice"} ...]. Note: reloads the file on each call; intended for low traffic and small catalogs.

EDN-backed catalog.

File format: a vector of maps [{:hashed "..." :user-id "alice"} ...].
Note: reloads the file on each call; intended for low traffic and small catalogs.
sourceraw docstring

fn-catalogclj

(fn-catalog f)

Wrap an arbitrary (fn [token] -> user-id|nil).

Wrap an arbitrary (fn [token] -> user-id|nil).
sourceraw docstring

hashed-map-catalogclj

(hashed-map-catalog hashed->user-id)

Catalog backed by an in-memory map keyed by hashed tokens.

Provide {<hash> -> <user-id>} where <hash> matches (k/hash-token token). This avoids storing raw tokens in memory.

Tokens must be high-entropy (random), not user-chosen.

Catalog backed by an in-memory map keyed by hashed tokens.

Provide {<hash> -> <user-id>} where <hash> matches (k/hash-token token).
This avoids storing raw tokens in memory.

Tokens must be high-entropy (random), not user-chosen.
sourceraw docstring

plain-map-catalogclj

(plain-map-catalog token->user-id)

Catalog backed by an in-memory map keyed by raw tokens (useful in tests).

Provide {<raw-token> -> <user-id>}.

Catalog backed by an in-memory map keyed by raw tokens (useful in tests).

Provide {<raw-token> -> <user-id>}.
sourceraw docstring

TokenCatalogcljprotocol

lookup-user-idclj

(lookup-user-id this token)

Return user-id (string/keyword) if bearer token is valid, else nil.

Return user-id (string/keyword) if bearer token is valid, else nil.
source

valid-token?clj

(valid-token? catalog token)

Return true if token is valid in catalog, else false.

Return true if token is valid in catalog, else false.
sourceraw docstring

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