NAME
Apache2::Controller::Session::Cookie - track a sessionid with a cookie in A2C
VERSION
Version 1.001.001
SYNOPSIS
See Apache2::Controller::Session for detailed setup example.
package MyApp::Session;
use base qw( Apache2::Controller::Session::Cookie );
sub get_options {
# ...
}
1;
DESCRIPTION
This module implements get_session_id
and set_session_id
to get and set the session id from a cookie.
DIRECTIVES
- A2C_Session_Cookie_Opts
Apache2::Controller::Directives
METHODS
These methods must by implemented by any Apache2::Controller::Session subclass.
get_session_id
my $sid = $self->get_session_id();
Get the session id from the cookie and verifies it.
Sets $r->pnotes->{a2c}{session_id}
to be the session id string.
See "get_cookie_jar" in Apache2::Controller::Methods and "A2C_Skip_Bogus_Cookies" in Apache2::Controller::Directives.
If the cookie is not present or invalid, returns undef.
Warns the debug log if sig validation fails and returns undef.
set_session_id
$self->set_session_id($sid);
Set the session id in the cookie.
SEE ALSO
"Apache2::Controller::Session" in Apache2::Controller::Directives
AUTHOR
Mark Hedges, <hedges at formdata.biz>
COPYRIGHT & LICENSE
Copyright 2008-2010 Mark Hedges, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This software is provided as-is, with no warranty and no guarantee of fitness for any particular purpose.