Skip to content

Commit c34a000

Browse files
committed
Update user guide
1 parent a02c5e2 commit c34a000

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

guide/index.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ or by the ``start`` method:
7676
'name' => 'session_id'
7777
]); // bool
7878
79+
Custom Options
80+
^^^^^^^^^^^^^^
81+
82+
Custom options only work if they are passed through the Session constructor.
83+
84+
- `Auto Regenerate ID`_
85+
- `Set-Cookie Permanent`_
86+
7987
Auto Regenerate ID
8088
##################
8189

@@ -92,6 +100,24 @@ options:
92100
'auto_regenerate_destroy' => true,
93101
]));
94102
103+
This will help avoid
104+
`Session Fixation <https://owasp.org/www-community/attacks/Session_fixation>`_.
105+
106+
Set-Cookie Permanent
107+
####################
108+
109+
It is possible to send the section's Set-Cookie header in all HTTP responses by
110+
setting the ``set_cookie_permanent`` option:
111+
112+
.. code-block:: php
113+
114+
$session = new Session([
115+
'set_cookie_permanent' => true,
116+
]));
117+
118+
This will cause the session cookie expiration date to be updated in the browser
119+
on every response.
120+
95121
Managing Data
96122
-------------
97123

0 commit comments

Comments
 (0)