Dancer::Plugin::Auth::RBAC::Credentials::DBIC - Dancer::Plugin::Auth::RBAC authentication via DBIx::Class
version 0.003
# in your app code my $auth = auth($login, $password); if ($auth) { # login successful }
Dancer::Plugin::Auth::RBAC::Credentials::DBIC uses your DBIx::Class schema as the application's user management system.
Validates a user against the defined DBIx::Class schema using the supplied arguments and configuration file options.
Minimal example:
plugins: DBIC: Auth: dsn: "dbi:SQLite:dbname=./foo.db" Auth::RBAC: credentials: class: DBIC
The following config options are avaialable:
The handle of the Dancer::Plugin::DBIC schema to use. Only needed if you have more than one schema defined.
The moniker for the result source which holds your users. Default User.
User
The name of the field that the login name is stored in. Default login.
login
The name of the field that the password is stored in. Default password.
password
This sets the password type. In order for the password module to verify the plaintext password passed in, it must be told what format the password will be in when it is retreived from the user object. The supported options are:
The password is stored in clear text and will be compared directly. This is the default.
The password will be passed to the check_password() method of the user object.
check_password()
The name of the field that the user id is stored in. Default id.
id
The name of the field that the user's name is stored in. Default name.
name
The name of the relationship to get the roles of a user. Default roles. Set to undef if you're not using roles.
roles
undef
The name of the field on the role object that the role name is stored in. Default name.
Dagfinn Ilmari Mannsåker <ilmari@photobox.com>
This software is copyright (c) 2011 by Photobox Limited.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'Mannsåker'. Assuming UTF-8
To install Dancer::Plugin::Auth::RBAC::Credentials::DBIC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dancer::Plugin::Auth::RBAC::Credentials::DBIC
CPAN shell
perl -MCPAN -e shell install Dancer::Plugin::Auth::RBAC::Credentials::DBIC
For more information on module installation, please visit the detailed CPAN module installation guide.