Auth utilities on top of JWT and ring middlewares.
Add the following dependency to your project.clj:
[clanhr/auth "0.4.0"]
The auth middleware should be applied to your Ring handler:
(:require 'clanhr.auth.auth-middleware :as auth)
(def app
(-> handler
(auth/run)))
Any request that don't have a valid JWT will be refused with an unauthorized response.
The api to create and validate tokens is given by token-for and valid? inside of clanhr.auth.core namespace.
Can you improve this documentation? These fine people already did:
lamuria, Pedro Santos & MarcosEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |