Liking cljdoc? Tell your friends :D

buddy-auth

Authentication and authorization for Ring web applications.

Clojars cljdoc test

Stack

Clojure Ring buddy-sign

What

buddy-auth provides pluggable authentication and authorization for Ring and Ring-based web applications:

  • Authentication backends: HTTP Basic, session, and token (incl. signed JWT/JWE via buddy-sign).
  • Ring middleware: wrap-authentication / wrap-authorization.
  • Access rules: declarative per-route authorization with clout patterns.

Installation

deps.edn:

net.clojars.savya/buddy-auth {:mvn/version "3.1.1"}

Leiningen:

[net.clojars.savya/buddy-auth "3.1.1"]

Usage

(require '[buddy.auth :refer [authenticated?]]
         '[buddy.auth.backends :as backends]
         '[buddy.auth.middleware :refer [wrap-authentication]])

(def backend (backends/basic {:authfn my-authfn}))

(def app
  (-> handler
      (wrap-authentication backend)))

Full guide: cljdoc and doc/user-guide.md.

Maintenance fork

This is a maintenance fork of funcool/buddy-auth, whose README flagged it as in maintenance mode and looking for a new maintainer. It is modernized (current buddy-sign/tools.build, Clojure 1.11/1.12 CI) and published under net.clojars.savya/buddy-auth. Original work by Andrey Antukh and contributors.

License

Apache License 2.0. Copyright 2013-2022 Andrey Antukh. See LICENSE.

Can you improve this documentation? These fine people already did:
Andrey Antukh, Savyasachi & Josh Graham
Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close