diff --git a/lib/Plack/Middleware/Auth/Basic.pm b/lib/Plack/Middleware/Auth/Basic.pm index bc0945320..fa069c193 100644 --- a/lib/Plack/Middleware/Auth/Basic.pm +++ b/lib/Plack/Middleware/Auth/Basic.pm @@ -85,12 +85,21 @@ A callback function that takes username, password and PSGI environment supplied and returns whether the authentication succeeds. Required. Authenticator can also be an object that responds to C -method that takes username and password and returns boolean, so -backends for L is perfect to use: +method that takes username and password and returns boolean, so any +backends for L are perfect to use: use Authen::Simple::LDAP; enable "Auth::Basic", authenticator => Authen::Simple::LDAP->new(...); +For authentication based on C files: + + use Authen::Simple::Passwd; + enable "Auth::Basic", + realm => "Password protected area", + authenticator => Authen::Simple::Passwd->new( + path => "/path/to/.htpasswd", + ); + =item realm Realm name to display in the basic authentication dialog. Defaults to I.