Liking cljdoc? Tell your friends :D
Clojure only.

flybot.oie.strategy.session


session-strategyclj

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