Yesterday, I released a YADP (Yet Another Dancer Plugin). It’s called Dancer::Plugin::Auth::Basic, and it adds support for basic HTTP authentication in Dancer apps. It’s a side effect of my work on a project that needed a simple access restriction mechanism — I thought it would be nice to have a HTTP authentication solution for Dancer which is easy to use and universal (meaning it does not rely on Plack or
Here’s a simple usage example — a fragment of Dancer configuration which restricts access to a specific path (
plugins: "Auth::Basic": paths: "/restricted": realm: Restricted zone user: fmulder password: trustno1
This plugin also happens to be the first CPAN module that I’ve built using Module::Build, instead of the rusty ExtUtils::MakeMaker. I’ve had no problems switching, the only thing that was a bit troublesome was creating a
README.pod file (which is a good thing to have if you’re publishing your module on Github), but I managed to do that eventually.