1Catalyst::Plugin::SessiUosne:r:SCtoantter:i:bCuotCoeakdtiaePl(ey3rs)lt:D:oPcluumgeinnt:a:tSieosnsion::State::Cookie(3)
2
3
4

NAME

6       Catalyst::Plugin::Session::State::Cookie - Maintain session IDs using
7       cookies.
8

SYNOPSIS

10           use Catalyst qw/Session Session::State::Cookie Session::Store::Foo/;
11

DESCRIPTION

13       In order for Catalyst::Plugin::Session to work the session ID needs to
14       be stored on the client, and the session data needs to be stored on the
15       server.
16
17       This plugin stores the session ID on the client using the cookie
18       mechanism.
19

METHODS

21       make_session_cookie
22           Returns a hash reference with the default values for new cookies.
23
24       update_session_cookie $hash_ref
25           Sets the cookie based on "cookie_name" in the response object.
26
27       calc_expiry
28       calculate_session_cookie_expires
29       cookie_is_rejecting
30       delete_session_id
31       extend_session_id
32       get_session_cookie
33       get_session_id
34       set_session_id
35

EXTENDED METHODS

37       prepare_cookies
38           Will restore if an appropriate cookie is found.
39
40       finalize_cookies
41           Will set a cookie called "session" if it doesn't exist or if its
42           value is not the current session id.
43
44       setup_session
45           Will set the "cookie_name" parameter to its default value if it
46           isn't set.
47

CONFIGURATION

49       cookie_name
50           The name of the cookie to store (defaults to
51           "Catalyst::Utils::apprefix($c) . '_session'").
52
53       cookie_domain
54           The name of the domain to store in the cookie (defaults to current
55           host)
56
57       cookie_expires
58           Number of seconds from now you want to elapse before cookie will
59           expire.  Set to 0 to create a session cookie, ie one which will die
60           when the user's browser is shut down.
61
62       cookie_secure
63           If this attribute set to 0 the cookie will not have the secure
64           flag.
65
66           If this attribute set to 1 (or true for backward compatibility) -
67           the cookie send by the server to the client will got the secure
68           flag that tells the browser to send this cookies back to the server
69           only via HTTPS.
70
71           If this attribute set to 2 then the cookie will got the secure flag
72           only if the request that caused cookie generation was sent over
73           https (this option is not good if you are mixing https and http in
74           you application).
75
76           Default vaule is 0.
77
78       cookie_httponly
79           If this attribute set to 0, the cookie will not have HTTPOnly flag.
80
81           If this attribute set to 1, the cookie will got HTTPOnly flag that
82           should prevent client side Javascript accessing the cookie value -
83           this makes some sort of session hijacking attacks significantly
84           harder. Unfortunately not all browsers support this flag (MSIE 6
85           SP1+, Firefox 3.0.0.6+, Opera 9.5+); if a browser is not aware of
86           HTTPOnly the flag will be ignored.
87
88           Default value is 1.
89
90           Note1: Many peole are confused by the name "HTTPOnly" - it does not
91           mean that this cookie works only over HTTP and not over HTTPS.
92
93           Note2: This paramater requires Catalyst::Runtime 5.80005 otherwise
94           is skipped.
95
96       cookie_path
97           The path of the request url where cookie should be baked.
98
99       For example, you could stick this in MyApp.pm:
100
101         __PACKAGE__->config( 'Plugin::Session' => {
102            cookie_domain  => '.mydomain.com',
103         });
104

CAVEATS

106       Sessions have to be created before the first write to be saved. For
107       example:
108
109               sub action : Local {
110                       my ( $self, $c ) = @_;
111                       $c->res->write("foo");
112                       $c->session( ... );
113                       ...
114               }
115
116       Will cause a session ID to not be set, because by the time a session is
117       actually created the headers have already been sent to the client.
118

SEE ALSO

120       Catalyst, Catalyst::Plugin::Session.
121

AUTHORS

123       Yuval Kogman <nothingmuch@woobling.org>
124

CONTRIBUTORS

126       This module is derived from Catalyst::Plugin::Session::FastMmap code,
127       and has been heavily modified since.
128
129         Andrew Ford
130         Andy Grundman
131         Christian Hansen
132         Marcus Ramberg
133         Jonathan Rockway E<lt>jrockway@cpan.orgE<gt>
134         Sebastian Riedel
135         Florian Ragwitz
136
138       Copyright (c) 2005 - 2009 the Catalyst::Plugin::Session::State::Cookie
139       "AUTHORS" and "CONTRIBUTORS" as listed above.
140

LICENSE

142       This program is free software, you can redistribute it and/or modify it
143       under the same terms as Perl itself.
144
145
146
147perl v5.28.0                      20C0a9t-a1l0y-s1t8::Plugin::Session::State::Cookie(3)
Impressum