This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-23
Channels
- # aws (2)
- # beginners (57)
- # boot (63)
- # cider (7)
- # clara (1)
- # cljs-dev (1)
- # cljsrn (5)
- # clojure (68)
- # clojure-brasil (1)
- # clojure-dusseldorf (2)
- # clojure-greece (10)
- # clojure-italy (29)
- # clojure-russia (1)
- # clojure-spec (9)
- # clojure-uk (66)
- # clojurescript (16)
- # cursive (18)
- # datomic (19)
- # docker (3)
- # figwheel (2)
- # fulcro (61)
- # instaparse (7)
- # jobs (1)
- # luminus (5)
- # lumo (47)
- # mount (6)
- # off-topic (13)
- # onyx (39)
- # planck (4)
- # portkey (2)
- # re-frame (28)
- # ring (6)
- # ring-swagger (30)
- # rum (3)
- # shadow-cljs (142)
- # spacemacs (5)
- # sql (2)
- # unrepl (61)
- # untangled (2)
Ok. That was late yesterday and the wrap choking might be due to me pasting in a string. Today I can rephrase: How do I nest the ring middleware to get oauth2 working? With this code
(let [settings (-> site-defaults
(assoc-in [:session :cookie-attrs :same-site] :lax))]
(run-jetty
(wrap-oauth2 (wrap-params (wrap-defaults handler settings)) authmap)
{:port 3000}))
ring-oauth2/wrap-oauth2 receives the request with :query-string
set but no :params
. So in ring-oauth2/get-access-token sends a request to the google Server with code
set to nil
.@magra try putting wrap-params to the outermost level. (using threading macro put it as the last middleware in your run-jetty
)
this is the source for wrap-params:
(fn [request]
(handler (params-request request options))))
you can see that it makes params available to the handler it wraps@magra did you figure it out 😄?