Skip to content

kelveden/duct.middleware.ring-jwt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ring-jwt

Duct/Integrant keys for wrapping the ring-jwt middleware.

Installation

[kelveden/duct.middleware.jwt "2.0.2"]

Usage

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.

As a duct module

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)]}}

As an integrant key

{: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]}}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published