Liking cljdoc? Tell your friends :D

flybot.oie.session


logout-handlerclj

(logout-handler {:keys [redirect-uri response-fn] :or {redirect-uri "/"}})

Returns a Ring handler that clears the session on POST. Returns 405 for non-POST requests. Callers should apply ring.middleware.anti-forgery/wrap-anti-forgery to protect against cross-site request forgery.

Options:

  • :response-fn - zero-arg fn returning a Ring response map. Use for SPAs where a redirect is not useful. Session is always cleared regardless.
  • :redirect-uri - redirect target (default "/"). Ignored when :response-fn is provided.
Returns a Ring handler that clears the session on POST.
Returns 405 for non-POST requests.
Callers should apply `ring.middleware.anti-forgery/wrap-anti-forgery`
to protect against cross-site request forgery.

Options:
- `:response-fn` - zero-arg fn returning a Ring response map. Use for SPAs
  where a redirect is not useful. Session is always cleared regardless.
- `:redirect-uri` - redirect target (default "/"). Ignored when
  `:response-fn` is provided.
sourceraw docstring

session-keyclj

Key under which the authenticated identity is stored in the Ring session. Used internally by session-strategy, wrap-oauth2, and wrap-magic-link.

Key under which the authenticated identity is stored in the Ring session.
Used internally by session-strategy, wrap-oauth2, and wrap-magic-link.
sourceraw docstring

session-timeout-handlerclj

(session-timeout-handler {:keys [redirect-uri] :or {redirect-uri "/"}})

Returns a Ring handler for session timeout responses. Returns 401 with a redirect hint for clients to handle re-authentication. Intended for use with ring.middleware.session-timeout/wrap-idle-session-timeout.

Returns a Ring handler for session timeout responses.
Returns 401 with a redirect hint for clients to handle re-authentication.
Intended for use with `ring.middleware.session-timeout/wrap-idle-session-timeout`.
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