This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-22
Channels
- # beginners (42)
- # boot (73)
- # cider (17)
- # clara (1)
- # cljs-dev (47)
- # cljsrn (9)
- # clojars (4)
- # clojure (241)
- # clojure-italy (11)
- # clojure-norway (5)
- # clojure-russia (93)
- # clojure-spec (28)
- # clojure-uk (32)
- # clojurescript (170)
- # core-async (20)
- # cursive (62)
- # data-science (2)
- # datomic (47)
- # dirac (4)
- # events (1)
- # funcool (12)
- # gsoc (1)
- # hoplon (59)
- # immutant (8)
- # lambdaisland (4)
- # luminus (3)
- # lumo (11)
- # off-topic (13)
- # om (81)
- # onyx (1)
- # pedestal (47)
- # planck (30)
- # re-frame (2)
- # reactive (1)
- # reagent (2)
- # ring-swagger (15)
- # rum (1)
- # slack-help (5)
- # specter (5)
- # testing (5)
- # uncomplicate (8)
- # untangled (16)
- # vim (71)
- # yada (16)
yes it is, endpoints return response maps, you can set headers there. there are helpers in ring.util.http-response
.
the header
fn comes from r.u.h-r. but response maps are just Ring maps, they have :status
, :body
and :headers
. you can just say (-> (ok “kikka”) (assoc-in [:headers “my-header”] “my-value”))
hey, has anyone here been able to successfully use jwt for authorizing the swagger-ui docs page?
I’ve been using liberator for my routes, with jwt auth. I recently found out about compojure-api, and I integrated the swagger docs and the compojure-api route definitions with my liberator routes, and it all works great. What I’m currently a little stumped on is the JWT auth. I see that swagger-ui supports some types of auth out of the box, but I was wondering if it was possible to integrate with jwt
@peyotz here’s a sample how to configure the swagger-ui to support token-auth: https://github.com/metosin/compojure-api/wiki/Swagger-integration#authentication--authorization