Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 772 Bytes

README.md

File metadata and controls

27 lines (16 loc) · 772 Bytes

ClanHR's Auth Library Build Status

Clojars Project

Auth utilities on top of JWT and ring middlewares.

Install

Add the following dependency to your project.clj:

[clanhr/auth "0.4.0"]

Usage

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.