-
-
Save mccraigmccraig/e166277b8964f5562dd45937a60bebd3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defnk make-http-handler | |
[[:handler-opts auth-secret] | |
cassandra :as app] | |
(info "making HTTP handler") | |
(info (with-out-str (clojure.pprint/pprint app))) | |
(let [auth-backend (auth-token/jws-backend {:secret auth-secret})] | |
(-> (make-http-route-handler app) | |
(mw/wrap-coerce-ids-handler) | |
(mw/wrap-check-short-token-authentication-validity-handler 15) ;; 10 second tokens | |
(mw/wrap-check-token-path-handler) | |
(wrap-authentication auth-backend) | |
(mw/wrap-log-request-handler)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment