Liking cljdoc? Tell your friends :D

turvata.ring.middleware


ms->sclj

(ms->s ms)
source

require-api-authclj

(require-api-auth handler)

Ring middleware that requires an API token in the Authorization header.

Expects: Authorization: Bearer <token> (also accepts Token <token>). On success, assoc :user-id in the request. On failure, returns 401 with WWW-Authenticate and Cache-Control: no-store.

Ring middleware that requires an API token in the Authorization header.

Expects: Authorization: Bearer <token> (also accepts Token <token>).
On success, assoc :user-id in the request.
On failure, returns 401 with WWW-Authenticate and Cache-Control: no-store.
sourceraw docstring

require-web-authclj

(require-web-auth handler)

Ring middleware that requires a valid session cookie.

Looks up the session token from the configured cookie name. On success, assoc :user-id in the request. May refresh the cookie on response. On failure, clears the cookie and redirects to the configured login URL with a ?next=... parameter for the current request URI.

Ring middleware that requires a valid session cookie.

Looks up the session token from the configured cookie name.
On success, assoc :user-id in the request. May refresh the cookie on response.
On failure, clears the cookie and redirects to the configured login URL with
a ?next=... parameter for the current request URI.
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