Basic authentication for ring (and compojure etc.)

Published at: 23.VIII.2010 21:26 CEST

I’ve always liked HTTP authentication (like basic and digest) over login pages because they look so.. technically savvy. Finally somebody who bothered to read an RFC to implement it and make me feel warm and welcome like peers do.

Okay, I must admit, it takes a customer just a couple of moments to request a logout button, which is a real pain to implement, if possible at all. And I wouldn’t want to login on something I care about from a public computer either. But it is very nice for web services!

Anyway here’s my implementation as ring middleware: ring-basic-authentication