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