Duct/Integrant keys for wrapping the ring-jwt middleware.
[ovotech/duct.middleware.jwt "1.0.0"]
Both a duct module and, for more flexibility, an integrant key are provided. Both options take an option map that is the same as for ring-jwt itself.
The Duct module will configure the ring-jwt middleware AND will hook it into
your :duct.handler/root
. i.e.
{:duct.module/ring-jwt
{:alg :HS256 :secret "somesecret"}}
will merge in the following config to your Duct configuration:
{:duct.middleware/ring-jwt
{:alg :HS256 :secret "somesecret"}
:duct.handler/root
{:middleware [(ig/ref :duct.middleware/ring-jwt)]}}
{:duct.middleware/ring-jwt
{:alg :HS256 :secret "somesecret"}
You will then need to hook it into a handler of your choice in your configuration; e.g.:
{:duct.handler/root
{:router #ig/ref :duct.router/ataraxy
:middleware [#ig/ref :duct.middleware/ring-jwt]}}
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close