[!!!][FEATURE] Refactored Session Handling
The AbstractUserAuthentication class handles way too much of what it should know / do. For this reason, a new UserSession object which contains basic information needed for everything belonging to a non-fixated session, a fixated anonymous session, if a session was evelated, or if a session has expired, is kept in there. The "SessionManager" should not be used anymore publically but slowly dissolve into a SessionBackendManager. Design goals: * UserAuth object should not know about session backends * UserAuth should not store sessionData etc. directly in its own object * Decouple UserSession info from any properties of UserAuth * A UserSessionManager deals with the creation and validation of the UserSession objects. No Session Objects can be created etc outside of this class to maintain persistability * UserSessionManager also encapsulates ipLocking and the responsible SessionBackend Final goals to be tackled later: * Build a user session object from the request object, and not within the UserAuth object * Session Handling can be accessed outside of UserAuth * Cookie Handling and Session Handling are separated from UserAuth * Load Session information from PSR-7 request instead of $_COOKIE Resolves: #93023 Releases: master Change-Id: Ia2d8244e433d0f6adf220d443b2c0947f251b5e9 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/66935 Tested-by:TYPO3com <noreply@typo3.com> Tested-by:
Oliver Bartsch <bo@cedev.de> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Benni Mack <benni@typo3.org>
Showing
- typo3/sysext/backend/Classes/Backend/ToolbarItems/UserToolbarItem.php 4 additions, 4 deletions.../backend/Classes/Backend/ToolbarItems/UserToolbarItem.php
- typo3/sysext/backend/Classes/Controller/AjaxLoginController.php 3 additions, 4 deletions...sysext/backend/Classes/Controller/AjaxLoginController.php
- typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php 11 additions, 0 deletions...t/backend/Classes/Middleware/BackendUserAuthenticator.php
- typo3/sysext/backend/Classes/Security/EmailLoginNotification.php 7 additions, 2 deletions...ysext/backend/Classes/Security/EmailLoginNotification.php
- typo3/sysext/backend/Tests/Functional/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php 0 additions, 1 deletion...ion/TypoScript/ConditionMatching/ConditionMatcherTest.php
- typo3/sysext/beuser/Classes/Controller/BackendUserController.php 1 addition, 1 deletion...ysext/beuser/Classes/Controller/BackendUserController.php
- typo3/sysext/beuser/Classes/Domain/Repository/BackendUserSessionRepository.php 17 additions, 16 deletions...lasses/Domain/Repository/BackendUserSessionRepository.php
- typo3/sysext/beuser/Classes/Hook/SwitchBackUserHook.php 1 addition, 1 deletiontypo3/sysext/beuser/Classes/Hook/SwitchBackUserHook.php
- typo3/sysext/beuser/Classes/ViewHelpers/SwitchUserViewHelper.php 1 addition, 1 deletion...ysext/beuser/Classes/ViewHelpers/SwitchUserViewHelper.php
- typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php 150 additions, 268 deletions...ore/Classes/Authentication/AbstractUserAuthentication.php
- typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php 18 additions, 19 deletions...core/Classes/Authentication/BackendUserAuthentication.php
- typo3/sysext/core/Classes/DataHandling/DataHandler.php 1 addition, 1 deletiontypo3/sysext/core/Classes/DataHandling/DataHandler.php
- typo3/sysext/core/Classes/Error/AbstractExceptionHandler.php 2 additions, 2 deletionstypo3/sysext/core/Classes/Error/AbstractExceptionHandler.php
- typo3/sysext/core/Classes/Error/ErrorHandler.php 2 additions, 2 deletionstypo3/sysext/core/Classes/Error/ErrorHandler.php
- typo3/sysext/core/Classes/Session/Backend/DatabaseSessionBackend.php 4 additions, 4 deletions...t/core/Classes/Session/Backend/DatabaseSessionBackend.php
- typo3/sysext/core/Classes/Session/Backend/RedisSessionBackend.php 1 addition, 1 deletion...sext/core/Classes/Session/Backend/RedisSessionBackend.php
- typo3/sysext/core/Classes/Session/SessionManager.php 1 addition, 1 deletiontypo3/sysext/core/Classes/Session/SessionManager.php
- typo3/sysext/core/Classes/Session/UserSession.php 273 additions, 0 deletionstypo3/sysext/core/Classes/Session/UserSession.php
- typo3/sysext/core/Classes/Session/UserSessionManager.php 361 additions, 0 deletionstypo3/sysext/core/Classes/Session/UserSessionManager.php
- typo3/sysext/core/Documentation/Changelog/master/Breaking-93023-ReworkedSessionHandling.rst 154 additions, 0 deletions...angelog/master/Breaking-93023-ReworkedSessionHandling.rst
Please register or sign in to comment