NAME
Egg::Model::Auth::Plugin::Keep - The attestation is maintained by Cookie.
SYNOPSIS
package MyApp::Model::Auth::MyAuth;
..........
__PACKAGE__->config(
check_sum => 'abcdefghijklmnopqrstu',
delimiter => ' : ',
param_name => '__auto_login',
cookie => {
...........
},
crypt => {
...........
},
);
__PACKAGE__->setup_plugin(qw/ Keep /);
__PACKAGE__->setup_session('SessionKit');
DESCRIPTION
The attestation session to which the code that can be decoded to Cookie is set and the session cut is revived. As a result, the attestation is maintained to perpetuity.
'plugin_keep' is set to the configuration to use it, and 'Keep' is included in the list of 'setup_session' method.
__PACKAGE__->setup_plugin(qw/ Keep /);
It and the session component are needed.
__PACKAGE__->setup_session( FileCache => qw/ Bind::Cookie / );
When 'login_check' is called, Cookie for the perpetuity attestation is set if the input parameter concerning 'The next automatic log in' is effective.
Attestation information is acquired from Cookie if the attestation session doesn't exist when 'is_login' is called and the attestation session is revived at the following.
It is necessary to note it very when using it to preserve attestation information in Cookie.
CONDIFGURATION
The following items are set and used in 'plugin_keep'.
check_sum
Character string of 20-40 suitable digit to generate checksum.
delimiter
Each attestation data delimiter. Default is ' : '.
param_name
Name of the form data for flag to do perpetuity attestation effectively. Default is '__auto_login'.
cookie
The content is a parameter to pass it to 'cookie' method of Egg::Response.
name ..... Name of Cookie. Default is 'aa'.
expires ..... Validity term of Cookie for perpetuity attestation. Default is '+7D'.
crypt
The content is an option to pass to Crypt::CBC.
METHODS
is_login
If the attestation session exists and doesn't exist, attestation information is acquired from Cookie, and the attestation session is revived.
And, processing is passed to 'is_login' of Egg::Model::Auth::Base.
reset
Cookie for the perpetuity attestation is annulled. And, processing is passed to 'reset' of Egg::Model::Auth::Base.
SEE ALSO
Egg::Release, Egg::Model::Auth, Egg::Model::Auth::Base, Egg::Response, Crypt::CBC, Digest::SHA1,
AUTHOR
Masatoshi Mizuno <lushe@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2008 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.