NAME
Egg::Plugin::SessionKit::Auth::DBIC - It attests it by DBIC.
SYNOPSIS
use Egg qw/ SessionKit::Auth::DBI /;
__PACKAGE__->egg_startup(
.......
...
MODEL => [ [ DBIC => {} ] ],
plugin_session=> {
.......
...
auth => {
model_name => 'myschema:members',
uid_db_search_field => 'uid',
.......
...
},
},
);
DESCRIPTION
It attests it by Egg::Model::DBIC.
It collates data from the following tables and it attests it.
CREATE TABLE members (
id int2 primary key,
uid varchar,
psw varchar,
active int2,
email varchar,
nickname varchar
);
* The above-mentioned is one example until becoming empty. If ID and the password that becomes a retrieval key become complete, it is not necessary to learn it from the above-mentioned. As for other data, the thing that uses 'user' method after login succeeds and refers becomes possible.
* DBIx::Class::ResultClass::HashRefInflator is used. As for this module, the package included even if it tries to install it specifying DBIx::Class from the CPAN module seems not to be downloaded. The included package is http://search.cpan.org/dist/DBIx-Class-0.07999_02/ Please refer to.
CONFIGURATION
model_name
Name of Model acquired from Egg::Model::DBIC.
There is no default. Please specify it.
uid_db_search_field
Name of column used for retrieval.
For instance, please specify it when the identifier is necessary etc.
uid_db_search_field => 'a.uid',
As for default, the value of 'uid_db_field' is copied.
search_attr
The second argument passed to 'Search' method of Model can be set.
* The retrieval is done by the following codes.
my $result= $model->search({ $uid_db_search_field => $uid }, $search_attr);
METHODS
restore ( [USER_ID] )
Data is returned by the HASH reference when found looking for USER_ID from the attestation data. 0 returns when not found.
SEE ALSO
Egg::Plugin::SessionKit, Egg::Plugin::SessionKit::Auth, Egg::Plugin::SessionKit::Auth::Crypt::CBC, Egg::Plugin::SessionKit::Auth::Crypt::MD5, Egg::Plugin::SessionKit::Auth::Crypt::Plain, Egg::Model::DBIC, Egg::Release,
AUTHOR
Masatoshi Mizuno <lushe@cpan.org>
COPYRIGHT
Copyright (C) 2007 by Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.