NAME
Egg::Plugin::SessionKit::Auth::DBI - It attests it by DBI.
SYNOPSIS
use Egg qw/ SessionKit::Auth::DBI /;
__PACKAGE__->egg_startup(
.......
...
MODEL => [ [ DBI => {
.......
...
} ] ],
plugin_session=> {
.......
...
auth => {
dbname => 'members',
restore_sql => q{ SELECT * FROM <$e.dbname> a }
. q{ LEFT OUTER JOIN profile b ON a.uid = b.uid }
. q{ WHERE a.uid = ? },
.......
...
},
},
);
DESCRIPTION
It attests it by Egg::Model::DBI.
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.
Please refer to the document of Egg::Plugin::SessionKit::Auth.
CONFIGURATION
dbname
Table name of attestation data.
Default is 'members'.
restore_sql
SQL sentence to retrieve data.
* $e->replace is done.
Default is ' SELECT * FROM <$e.dbname> WHERE <$e.uid_db_field> = ? '.
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::DBI, 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.