This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-01
Channels
- # announcements (21)
- # architecture (6)
- # aws (18)
- # babashka (14)
- # beginners (231)
- # boot (1)
- # calva (2)
- # chlorine-clover (22)
- # cider (34)
- # clara (16)
- # clj-kondo (53)
- # cljdoc (5)
- # cljs-dev (22)
- # cljsrn (3)
- # clojure (283)
- # clojure-europe (24)
- # clojure-italy (9)
- # clojure-nl (5)
- # clojure-spec (5)
- # clojure-uk (57)
- # clojurescript (14)
- # core-typed (8)
- # cursive (4)
- # data-science (11)
- # datomic (41)
- # docker (24)
- # duct (2)
- # emacs (2)
- # exercism (29)
- # fulcro (96)
- # graalvm (4)
- # jobs-discuss (1)
- # kaocha (53)
- # lambdaisland (20)
- # malli (5)
- # nrepl (4)
- # observability (7)
- # off-topic (40)
- # pathom (44)
- # pedestal (8)
- # re-frame (19)
- # shadow-cljs (58)
- # spacemacs (2)
- # sql (9)
- # tools-deps (15)
- # vim (3)
- # yada (10)
I am trying to hook pedestal up to auth0 authentication using their `
com.auth0/mvc-auth-commons {:mvn/version "1.2.0"}
client library, and it expects to use a SessionManager to store nonce, etc whilst awaiting the authentication to return
Vanilla pedestal throws me a
Caused by: java.lang.IllegalStateException: No SessionManager
at org.eclipse.jetty.server.Request.getSession(Request.java:1568)
Is there any received wisdom around Session Managers or Auth0 in Pedestal?
should I just apply
https://stackoverflow.com/questions/19718159/java-lang-illegalstateexception-no-sessionmanager
and hope for the best?oh perhaps I'd better read https://www.eclipse.org/jetty/documentation/current/session-management.html
which is passing a (SessionHandler)null
to the ServletContextHandler
but perhaps I get the chance to reshape that context a few lines further down at
(when context-configurator
(context-configurator context))
I might be able to abuse the options
{:context-configurator
(fn [^ServletContextHandler sch]
(set! (.-_options sch) ServletContextHandler/SESSIONS)
although (set! (.-_options
is looking a bit hacky...
:io.pedestal.http/container-options
{:context-configurator
(fn [^ServletContextHandler sch]
(.insertHandler sch (SessionHandler.))
seems to do the trick though