Liking cljdoc? Tell your friends :D

turvata.ring.handlers


logged-in?-handlerclj

(logged-in?-handler request)

Return the current session auth map (e.g. {:user-id ...}) if the request is already authenticated via the session cookie, else nil. Not a Ring response.

Return the current session auth map (e.g. {:user-id ...}) if the request is
already authenticated via the session cookie, else nil. Not a Ring response.
sourceraw docstring

login-handlerclj

(login-handler request)

POST handler that validates username+token against the TokenCatalog, creates a new session in the SessionStore, sets the session cookie, and redirects.

Redirect target is taken from the :next param (relative paths only) or falls back to :post-login-redirect.

POST handler that validates username+token against the TokenCatalog, creates
a new session in the SessionStore, sets the session cookie, and redirects.

Redirect target is taken from the :next param (relative paths only) or falls
back to :post-login-redirect.
sourceraw docstring

logout-handlerclj

(logout-handler request)

POST handler Clear cookie + session and redirect to a confirmation page.

POST handler Clear cookie + session and redirect to a confirmation page.
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