1 package Plack::Session::State::Cookie;
5 use parent 'Plack::Session::State';
7 use Plack::Util::Accessor qw[
14 sub expire_session_id {
16 $self->SUPER::expire_session_id( $id );
21 my ($self, $request) = @_;
22 $self->check_expired( ( $request->cookie( $self->session_key ) || return )->value );
26 my ($self, $id, $response) = @_;
27 $response->cookies->{ $self->session_key } = +{
29 path => ($self->path || '/'),
30 ( $self->domain ? ( domain => $self->domain ) : () ),
31 ( $self->expires ? ( expires => $self->expires ) : () ),
32 ( $self->secure ? ( secure => $self->secure ) : () ),
44 Plack::Session::State::Cookie - Basic cookie-based session state
52 =item B<new ( %params )>
66 =item B<extract ( $request )>
68 =item B<finalize ( $session_id, $response )>
74 =item B<expire_session_id ( $id )>
80 All complex software has bugs lurking in it, and this module is no
81 exception. If you find a bug please either email me, or add the bug
86 Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
88 =head1 COPYRIGHT AND LICENSE
90 Copyright 2009 Infinity Interactive, Inc.
92 L<http://www.iinteractive.com>
94 This library is free software; you can redistribute it and/or modify
95 it under the same terms as Perl itself.