Version requirement bump
[catagits/Catalyst-Plugin-Session-State-Cookie.git] / README
1 NAME
2     Catalyst::Plugin::Session::State::Cookie - Maintain session IDs using
3     cookies.
4
5 SYNOPSIS
6         use Catalyst qw/Session Session::State::Cookie Session::Store::Foo/;
7
8 DESCRIPTION
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
11     server.
12
13     This plugin stores the session ID on the client using the cookie
14     mechanism.
15
16 METHODS
17     make_session_cookie
18         Returns a hash reference with the default values for new cookies.
19
20     update_session_cookie $hash_ref
21         Sets the cookie based on "cookie_name" in the response object.
22
23     calc_expiry
24     calculate_session_cookie_expires
25     cookie_is_rejecting
26     delete_session_id
27     extend_session_id
28     get_session_cookie
29     get_session_id
30     set_session_id
31
32 EXTENDED METHODS
33     prepare_cookies
34         Will restore if an appropriate cookie is found.
35
36     finalize_cookies
37         Will set a cookie called "session" if it doesn't exist or if it's
38         value is not the current session id.
39
40     setup_session
41         Will set the "cookie_name" parameter to it's default value if it
42         isn't set.
43
44 CONFIGURATION
45     cookie_name
46         The name of the cookie to store (defaults to
47         "Catalyst::Utils::apprefix($c) . '_session'").
48
49     cookie_domain
50         The name of the domain to store in the cookie (defaults to current
51         host)
52
53     cookie_expires
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.
57
58     cookie_secure
59         If this attribute set true, the cookie will only be sent via HTTPS.
60
61     cookie_path
62         The path of the request url where cookie should be baked.
63
64 CAVEATS
65     Sessions have to be created before the first write to be saved. For
66     example:
67
68             sub action : Local {
69                     my ( $self, $c ) = @_;
70                     $c->res->write("foo");
71                     $c->session( ... );
72                     ...
73             }
74
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.
77
78 SEE ALSO
79     Catalyst, Catalyst::Plugin::Session.
80
81 AUTHORS
82     Yuval Kogman <nothingmuch@woobling.org>
83
84 CONTRIBUTORS
85     This module is derived from Catalyst::Plugin::Session::FastMmap code,
86     and has been heavily modified since.
87
88     Andrew Ford Andy Grundman Christian Hansen Marcus Ramberg Jonathan
89     Rockway <jrockway@cpan.org> Sebastian Riedel
90
91 COPYRIGHT
92     This program is free software, you can redistribute it and/or modify it
93     under the same terms as Perl itself.
94