(session-strategy)(session-strategy {:keys [verify]})Returns a strategy map that checks the session for an authenticated user.
Reads identity from the hardcoded session key ::session/user.
Options:
:verify (fn [identity] -> identity | nil) — optional re-validation.
Called with the session identity on every request. Return a (possibly
enriched) identity to authenticate, or nil to treat the session as stale
and skip to the next strategy.Returns a strategy map that checks the session for an authenticated user. Reads identity from the hardcoded session key `::session/user`. Options: - `:verify` `(fn [identity] -> identity | nil)` — optional re-validation. Called with the session identity on every request. Return a (possibly enriched) identity to authenticate, or nil to treat the session as stale and skip to the next strategy.
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 |