|
NAMECatalyst::Plugin::Authentication::CDBI - CDBI Authentication for Catalyst SYNOPSIS use Catalyst 'Authentication::CDBI';
__PACKAGE__->config->{authentication} = {
user_class => 'PetStore::Model::CDBI::Customer',
user_field => 'email',
role_class => 'PetStore::Model::CDBI::Role',
user_role_class => 'PetStore::Model::CDBI::CustomerRole',
user_role_user_field => 'customer'
};
$c->login( $user, $password );
$c->logout;
$c->session_login( $user, $password );
$c->session_logout;
$c->roles(qw/customer admin/);
CREATE TABLE customer (
id INTEGER PRIMARY KEY,
email TEXT,
password TEXT
);
CREATE TABLE role (
id INTEGER PRIMARY KEY,
name TEXT
);
CREATE TABLE customer_role (
id INTEGER PRIMARY KEY,
customer INTEGER REFERENCES customer,
role INTEGER REFERENCES role
);
DESCRIPTIONThis plugin allows you to authenticate your web users using database tables accessed through "Class::DBI" classes. Note that this plugin requires a session plugin such as "Catalyst::Plugin::Session::FastMmap". This module is now well past the teatime of it's lifespan, and no new features will be added. For new applications, you probably want to look at Catalyst::Plugin::Authentication and friends instead CONFIGURATIONThis plugin is configured by passing an "authentication" hash reference to your application's config method. The following keys are supported:
METHODS
EXTENDED METHODS
OVERLOADED METHODS
SEE ALSOCatalyst, Catalyst::Plugin::Session::FastMmap AUTHORSebastian Riedel <sri@cpan.org>, Marcus Ramberg <mramberg@cpan.org>, Andrew Ford <a.ford@ford-mason.co.uk> COPYRIGHTThis program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
|