Class SessionCookie
Session Cookie
This class provides an HTTP cookie storage mechanism for session data. This class avoids using a PHP session and instead serializes/unserializes the $_SESSION global variable to/from an HTTP cookie.
If a secret key is provided with this middleware, the HTTP cookie will be checked for integrity to ensure the client-side cookie is not changed.
You should NEVER store sensitive data in a client-side cookie in any format, encrypted or not. If you need to store sensitive user information in a session, you should rely on PHP's native session implementation, or use other middleware to store session data in a database or alternative server-side cache.
Because this class stores serialized session data in an HTTP cookie, you are inherently limtied to 4 Kb. If you attempt to store more than this amount, serialization will fail.
- Slim\Middleware
-
Slim\Middleware\SessionCookie
Package: Slim
Author: Josh Lockhart
Since: 1.6.0
Located at thirdparty/Slim/Middleware/SessionCookie.php
public
|
|
public
|
|
protected
|
|
protected
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
getApplication(),
getNextMiddleware(),
setApplication(),
setNextMiddleware()
|
protected
array
|
$settings | |
$app,
$next
|