Why not adopt me?
NAME
Plack::Middleware::Auth::Htpasswd - http basic authentication through apache-style .htpasswd files
VERSION
version 0.01
SYNOPSIS
use Plack::Builder;
my $app = sub { ... };
builder {
enable "Auth::Htpasswd", file => '/path/to/.htpasswd';
$app;
};
or
builder {
enable "Auth::Htpasswd", file_root => '/path/to/my/static/files';
$app;
};
DESCRIPTION
This middleware enables HTTP Basic authenication, based on the users in an Apache-style htpasswd file. You can either specify the file directly, through the file
option, or use the file_root
option to specify the root directory on the filesystem that corresponds to the web application root. This second option is more useful when using an app that is closely tied to the filesystem, such as Plack::App::Directory. If file_root
is used, the requested path will be inspected, and a file named .htpasswd
will be checked in each containing directory, up to the file_root
. The first one found will be used to validate the requested user.
CONFIGURATION
file
Name of a .htpasswd file to read authentication information from. Required if file_root
is not set.
file_root
Path to the on-disk directory that corresponds to the root URL path of the app. Required file
is not set, and ignored if file
is set.
realm
Realm name to display in the basic authentication dialog. Defaults to 'restricted area'.
CREDITS
Large parts of this code were modeled after (read: stolen from) Plack::Middleware::Auth::Basic by Tatsuhiko Miyagawa.
BUGS
No known bugs.
Please report any bugs through RT: email bug-plack-middleware-auth-htpasswd at rt.cpan.org
, or browse to http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Plack-Middleware-Auth-Htpasswd.
SEE ALSO
SUPPORT
You can find this documentation for this module with the perldoc command.
perldoc Plack::Middleware::Auth::Htpasswd
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
http://cpanratings.perl.org/d/Plack-Middleware-Auth-Htpasswd
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Plack-Middleware-Auth-Htpasswd
Search CPAN
AUTHOR
Jesse Luehrs <doy at tozt dot net>
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Jesse Luehrs.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.