| Catalyst-Plugin-Authentication-Store-Htpasswd documentation | Contained in the Catalyst-Plugin-Authentication-Store-Htpasswd distribution. |
Catalyst::Plugin::Authentication::Store::Htpasswd - Authentication
database in $c->config.
use Catalyst qw/
Authentication
Authentication::Store::Htpasswd
Authentication::Credential::Password
/;
__PACKAGE__->config->{authentication}{htpasswd} = "passwdfile";
sub login : Global {
my ( $self, $c ) = @_;
$c->login( $c->req->param("login"), $c->req->param("password"), );
}
This plugin uses Authen::Htpasswd to let your application use .htpasswd
files for it's authentication storage.
This method will popultate $c->config->{authentication}{store} so that
default_auth_store in Catalyst::Plugin::Authentication can use it.
The path to the htpasswd file.
Yuval Kogman nothingmuch@woobling.org
David Kamholz dkamholz@cpan.org
Copyright (c) 2005 the aforementioned authors. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Catalyst-Plugin-Authentication-Store-Htpasswd documentation | Contained in the Catalyst-Plugin-Authentication-Store-Htpasswd distribution. |
#!/usr/bin/perl package Catalyst::Plugin::Authentication::Store::Htpasswd; use strict; use warnings; our $VERSION = '0.02'; use Catalyst::Plugin::Authentication::Store::Htpasswd::Backend; sub setup { my $c = shift; $c->default_auth_store( Catalyst::Plugin::Authentication::Store::Htpasswd::Backend->new( $c->config->{authentication}{htpasswd} ) ); $c->NEXT::setup(@_); } __PACKAGE__; __END__