Some Ring middleware
Some Ring middleware
(wrap-catchall handler)
Catches and logs exceptions.
Catches and logs exceptions.
(wrap-debug handler)
(wrap-debug handler {:keys [exclude]})
Logs requests and responses with taonsso.timbre/debug
.
Logs requests and responses with `taonsso.timbre/debug`.
(wrap-mount handler)
Ensures that mount.core/start
has been called.
Ensures that `mount.core/start` has been called.
(wrap-uid handler {:keys [verify-token uid-key] :or {uid-key "user_id"}})
Authenticates the request, or gives a 401 response.
Takes the value of the Authorization header and passes it to verify-token
,
which should return a map of claims (e.g. {"user_id": "foo", "email": "alice@example.com"}
).
The following keys will be added to the request: :claims
(the return value
of verify-token
) and :uid
((get claims uid-key)
, for convenience).
Authenticates the request, or gives a 401 response. Takes the value of the Authorization header and passes it to `verify-token`, which should return a map of claims (e.g. `{"user_id": "foo", "email": "alice@example.com"}`). The following keys will be added to the request: `:claims` (the return value of `verify-token`) and `:uid` (`(get claims uid-key)`, for convenience).
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close