NAME
Dancer::Plugin::Auth::DB - Interface for manage authentication with DBIX.
SYNOPSIS
use Dancer;
use Dancer::Plugin::Auth::DB;
get '/login' => sub {
login();
};
dance;
DESCRIPTION
Provides an easy to manage authentication with a database for Dancer application. This module use Dancer::Plugin::DBIC. In the config file you must specified the name of the table contain the user, name of the row for username and password.
This module use SHA256 digests to store password.
CONFIGURATION
plugins:
Auth::DB:
table_name: 'Mytable'
row_user: 'name_row_user'
row_pass: 'name_row_pass'
METHODS
subscribe($username, $password, $schema)
To add a new user in a database. The lastest argument is hashref and is optional.
login($username, $password)
To login. If login is succesful, add user_id and user_name in session.
logout
To logout.
AUTHOR
Natal Ngétal, <hobbestigrou@cpan.org>
Dancer Dancer::Plugin::DBIC l<Digest::SHA>