This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-17
Channels
- # announcements (1)
- # babashka (94)
- # beginners (76)
- # calva (24)
- # cider (24)
- # clj-kondo (1)
- # cljs-dev (16)
- # cljsrn (45)
- # clojure (135)
- # clojure-europe (9)
- # clojure-france (5)
- # clojure-germany (2)
- # clojure-italy (12)
- # clojure-losangeles (13)
- # clojure-nl (3)
- # clojure-portugal (54)
- # clojure-uk (20)
- # clojurescript (55)
- # conjure (67)
- # core-async (5)
- # cursive (2)
- # datomic (10)
- # docker (7)
- # duct (22)
- # emacs (16)
- # fulcro (34)
- # graalvm (15)
- # hoplon (1)
- # instaparse (1)
- # jobs-discuss (3)
- # juxt (94)
- # luminus (1)
- # meander (4)
- # off-topic (13)
- # pathom (4)
- # pedestal (1)
- # ring (3)
- # ring-swagger (2)
- # shadow-cljs (61)
- # spacemacs (17)
- # specter (2)
- # sql (23)
- # xtdb (33)
I have the following routes:
{:duct.profile/base {:duct.core/project-ns logout
:duct.router/ataraxy
{:routes {"/v1/logout" [:logout]}
:handlers {:logout #ig/ref :my-app/logout}}
:duct.logger/clojure {}}
:duct.profile/dev #duct/include "dev"
:duct.profile/local #duct/include "local"
:duct.profile/prod {}
:duct.module.web/api {}
:my-app/logout {:env/deployment-env #duct/env "DEPLOYMENT_ENV"}}
and in ns my-app
the following init-key:
(defmethod ig/init-key :my-app/logout
[_ {:env/keys [deployment-env] :as _opts}]
(log/info ::logout.init {:deployment-env deployment-env})
(fn [_handler]
(fn [request]
(log/debug ::logout {:request request})
(create-logout-response deployment-env))))
When I start the system with lein repl (dev) (go)
I get:
Execution error (IllegalArgumentException) at integrant.core/load-namespaces (core.cljc:182).
Don't know how to create ISeq from: my-app.logout$eval18600$fn__18602$fn__18604$fn__18605
Any idea why?
I think it should be :routes {"/v1/logout" [:my-app/logout]}
. And remove the :handlers
key
Same result
Ah moving it to the base profile fixed the problem
Thanks! 😄
@weavejester This PR is still open, regarding adding a specific error message for when a regular key is added outside of the base profile https://github.com/duct-framework/core/pull/32 Maybe we can get this merged to prevent this in the future?
Error when calling the endpoint is: java.lang.ClassCastException my-app.logout$eval25212$fn__25214$fn__25216$fn__25217 cannot be cast to clojure.lang.Associative
Any suggestions?
create-logout-response
:
(defn- create-logout-response [deployment-env]
{:status see-other-status-code
:headers {"location" (create-keycloak-logout-url deployment-env)
"set-cookie" (create-expired-keycloak-cookies deployment-env)}})
Just returns a map
Works. Thanks!!! 😆