NAME

Dancer::Session::Cookie - Encrypted cookie-based session backend for Dancer

DESCRIPTION

This module implements a session engine for sessions stored entirely inside cookies. Usually only session id is stored in cookies and the session data itself is saved in some external storage like database. This module allows us to avoid using external storage at all.

Since we cannot trust any data provided by client in cookies, we use cryptography to ensure secrecy and integrity.

CONFIGURATION

The setting session should be set to cookie in order to use this session engine in a Dancer application.

A mandatory setting is needed as well: session_cookie_key, which should contain a random string of at least 16 characters (shorter keys are not cryptographically strong using AES in CBC mode).

Here is an example configuration that uses this session engine:

session: "cookie"
session_cookie_key: "kjsdf07234hjf0sdkflj12*&(@*jk"

DEPENDENCY

This module depends on Crypt::CBC, Crypt::Rijndael, String::CRC32, Storable and MIME::Base64.

AUTHOR

This module has been written by Alex Kapranoff, see the AUTHORS file for details.

SEE ALSO

See Dancer::Session for details about session usage in route handlers.

COPYRIGHT

This module is copyright (c) 2009 Alex Kapranoff <kappa@cpan.org>.

LICENSE

This module is free software and is released under the same terms as Perl itself.