Public Member Functions | |
| process_request (&$request) | |
| process_response ($request, $response) | |
Static Public Member Functions | |
| static | _encodeData ($data) |
| static | _decodeData ($encoded_data) |
| static | processContext ($signal, &$params) |
Allow a session object in the request and the automatic login/logout of a user if a standard authentication against the Pluf_User model is performed.
| Pluf_Middleware_Session::process_request | ( | &$ | request | ) |
Process the request.
When processing the request, if a session is found with Pluf_User creditentials the corresponding user is loaded into $request->user.
FIXME: We should logout everybody when the session table is emptied.
| Pluf_HTTP_Request | The request |
| Pluf_Middleware_Session::process_response | ( | $ | request, | |
| $ | response | |||
| ) |
Process the response of a view.
If the session has been modified save it into the database. Add the session cookie to the response.
| Pluf_HTTP_Request | The request | |
| Pluf_HTTP_Response | The response |
| static Pluf_Middleware_Session::_encodeData | ( | $ | data | ) | [static] |
Encode the cookie data and create a check with the secret key.
| mixed | Data to encode |
| static Pluf_Middleware_Session::_decodeData | ( | $ | encoded_data | ) | [static] |
Decode the data and check that the data have not been tampered.
If the data have been tampered an exception is raised.
| string | Encoded data |
| static Pluf_Middleware_Session::processContext | ( | $ | signal, | |
| &$ | params | |||
| ) | [static] |