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