NAME

Egg::Model::Auth::Session::FileCache - Session management for AUTH component.

SYNOPSIS

package MyApp::Model::Auth::MyAuth;
..........

__PACKAGE__->config(
  filecache => {
    cache_root  => MyApp->path_to('cache'),
    namespace   => 'AuthSession',
    cache_depth => 3,
    .............
    ......
    },
  );

__PACKAGE__->setup_session( FileCache => qw/ Bind::Cookie / );

DESCRIPTION

An easy session function is offered to the AUTH component by Cache::FileCache.

To use it, Cache::FileCache is set by 'filecache' of the configuration. And, 'FileCache' is set by 'setup_session' method.

If neither it nor Bind system component are set up, Egg::Model::Auth::Bind::Cookie is specified with the client following 'FileCache' because the mistress cannot injure.

__PACKAGE__->setup_session( FileCache => qw/ Bind::Cookie / );

This module doesn't come to annul the session data positively. Please set by the configuration concerning auto_purge or receive the Cache::FileCache object from 'filecache' method and control data.

METHODS

filecache

Cache::FileCache The object is returned.

make_session_id

Session ID is generated and it returns it.

Session ID is generated with Digest::SHA1 or Digest::MD5.

The character string length of session ID can be set by 'session_id_length' of the configuration.

The AUTH controller must Obarraid it this method when you want to generate original session ID.

get_session ([SESSION_ID])

The session data corresponding to SESSION_ID is returned.

set_session ([SESSION_DATA_HASH], [SESSION_ID])

The session data is preserved. And, session ID is passed to 'set_bind_id'.

When SESSION_ID is omitted, new session ID is received from 'make_session_id' method.

remove_session ([SESSION_ID])

The session data corresponding to SESSION_ID is annulled.

SEE ALSO

Egg::Release, Egg::Model::Auth, Egg::Model::Auth::Bind::Cookie, Cache::FileCache, UNIVERSAL::require,

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.