aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/SessionManager.php
Commit message (Collapse)AuthorAgeFilesLines
* Refactor PHP session handling during login/logoutVirtualTam2018-05-291-0/+40
| | | | | | | | Changed: - move $_SESSION handling to SessionManager - code cleanup Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Refactor SessionManager::$INACTIVITY_TIMEOUTVirtualTam2018-05-291-0/+4
| | | | | | | | | | | | Changed: - move INACTIVITY_TIMEOUT to SessionManager - inject a dependency to a SessionManager instance in: - fillSessionInfo() - setup_login_state() - check_auth() - cleanup related code and comments Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Improve SessionManager constructor and testsVirtualTam2017-11-081-3/+3
| | | | | | | | | | | Relates to https://github.com/shaarli/Shaarli/pull/1005 Changed: - pass a copy of the ConfigManager instance instead of a reference - move FakeConfigManager to a dedicated file - update tests Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Move session ID check to SessionManagerVirtualTam2017-10-221-0/+30
| | | | | | | | | | Relates to https://github.com/shaarli/Shaarli/issues/324 Changed: - `is_session_id_valid()` -> `SessionManager::checkId()` - update tests Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Refactor session token managementVirtualTam2017-10-221-0/+53
Relates to https://github.com/shaarli/Shaarli/issues/324 Added: - `SessionManager` class to group session-related features - unit tests Changed: - `getToken()` -> `SessionManager->generateToken()` - `tokenOk()` -> `SessionManager->checkToken()` - inject a `$token` parameter to `PageBuilder`'s constructor Signed-off-by: VirtualTam <virtualtam@flibidi.net>