This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-20
Channels
- # announcements (1)
- # beginners (65)
- # calva (16)
- # cider (44)
- # clara (16)
- # clojure (84)
- # clojure-dev (48)
- # clojure-europe (5)
- # clojure-finland (4)
- # clojure-houston (1)
- # clojure-italy (19)
- # clojure-nl (27)
- # clojure-russia (6)
- # clojure-spec (37)
- # clojure-uk (123)
- # clojured (11)
- # clojurescript (21)
- # datomic (40)
- # duct (4)
- # emacs (6)
- # figwheel (4)
- # figwheel-main (5)
- # fulcro (34)
- # jackdaw (8)
- # juxt (117)
- # kaocha (3)
- # klipse (1)
- # leiningen (33)
- # luminus (2)
- # nyc (3)
- # off-topic (29)
- # om (1)
- # pedestal (7)
- # planck (4)
- # re-frame (27)
- # reagent (8)
- # reitit (5)
- # rum (2)
- # shadow-cljs (428)
- # spacemacs (5)
- # tools-deps (15)
- # yada (6)
I'm discovering and assessing yada for a future api project. So far so good.
But I don't know how I am supposed to implement a generic middleware/interceptor that can be applied to multiple resources.
Some resources should be secured and accessed by administrator only. If I wrap them with a ring middleware they don't appear in swagger anymore. I could make an interceptor but yada documentation is light on this topic. Should I put it in :interceptor-chain
? Should I derive yada.yada/default-interceptor-chain
, add my interceptor at the correct place?
@ggaillard the general recommendation on this is to treat your yada resources on data and walk over your bidi structure in order to locate admin routes.
Thanks! If I get it right add-admin-auth
is supposed to alter the resource map to change the interceptor chain and/or wrap the :authorize
function?
What would you do on an individual yada resource to make it an admin one? I suspect you would set your authorize function yeah
Ok make sense. Thank you 🙂