Ado::Sessions - A factory for HTTP Sessions in Ado
Ado::Sessions chooses the desired type of session storage and loads it.
#in ado.conf session => { type => 'database', options => { cookie_name => 'ado', default_expiration => 86400, } } #In Ado.pm: has sessions => sub { Ado::Sessions::get_instance(shift->config) };
Cookie domain accessor
Cookie name accessor
Cookie path accessor
Cookie default expiration accessor
Session id generator
Factory method for creating Ado session instance
Shares common logic which is compatible with Mojolicious::Sessions. The storage implementation class should call this method after it loads the session from the respective storage.
$self->prepare_load($c, $session);
Cookie is secure, flag
Shares common logic which is compatible with Mojolicious::Sessions. The storage implementation class should call this method before it stores the session to the the respective storage. Returns the session id and the session ready to be serialized and base 64 encoded.
my ($id, $session) = $self->prepare_store($c);
Retrieves the session id from a parameter or cookie defaulting to cookie_name. The cookie_name can be set in ado.conf section session.
cookie_name
ado.conf
session
my $id = $self->session_id($c);
Mojolicious::Sessions, Ado::Sessions::File, Ado::Sessions::Database, Using CORS
To install Ado, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Ado
CPAN shell
perl -MCPAN -e shell install Ado
For more information on module installation, please visit the detailed CPAN module installation guide.