2 Catalyst::Plugin::Session::State::Cookie - Maintain session IDs using
6 use Catalyst qw/Session Session::State::Cookie Session::Store::Foo/;
9 In order for Catalyst::Plugin::Session to work the session ID needs to
10 be stored on the client, and the session data needs to be stored on the
13 This plugin stores the session ID on the client using the cookie
18 Returns a hash reference with the default values for new cookies.
20 update_session_cookie $hash_ref
21 Sets the cookie based on "cookie_name" in the response object.
24 calculate_session_cookie_expires
34 Will restore if an appropriate cookie is found.
37 Will set a cookie called "session" if it doesn't exist or if it's
38 value is not the current session id.
41 Will set the "cookie_name" parameter to it's default value if it
46 The name of the cookie to store (defaults to
47 "Catalyst::Utils::apprefix($c) . '_session'").
50 The name of the domain to store in the cookie (defaults to current
54 Number of seconds from now you want to elapse before cookie will
55 expire. Set to 0 to create a session cookie, ie one which will die
56 when the user's browser is shut down.
59 If this attribute set true, the cookie will only be sent via HTTPS.
62 The path of the request url where cookie should be baked.
65 Sessions have to be created before the first write to be saved. For
69 my ( $self, $c ) = @_;
70 $c->res->write("foo");
75 Will cause a session ID to not be set, because by the time a session is
76 actually created the headers have already been sent to the client.
79 Catalyst, Catalyst::Plugin::Session.
82 Yuval Kogman <nothingmuch@woobling.org>
85 This module is derived from Catalyst::Plugin::Session::FastMmap code,
86 and has been heavily modified since.
88 Andrew Ford Andy Grundman Christian Hansen Marcus Ramberg Jonathan
89 Rockway <jrockway@cpan.org> Sebastian Riedel
92 This program is free software, you can redistribute it and/or modify it
93 under the same terms as Perl itself.