[TASK] Move FE User initialization into PSR-15 middleware 53/55753/4
authorBenni Mack <benni@typo3.org>
Fri, 16 Feb 2018 12:13:12 +0000 (13:13 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Mon, 19 Feb 2018 08:55:48 +0000 (09:55 +0100)
commit25b9253fc2fe7ad76368ed136bff6f7324648558
treef5ec456b536b200d67c31a019b2aea9f7aeffc78
parentff1c068ac5fdec3f5e8d03c5369ee8d0fc3615aa
[TASK] Move FE User initialization into PSR-15 middleware

The initialization of a frontend user is currently bound to TSFE,
however, the only parts where TSFE is actually needed is to
set the frontenduserauthentication object to $TSFE->fe_user
and to call a post-processing hook, which could be dealt with
through a middleware for extensions.

Further steps are to deprecate "initFEuser()" method, and to move
the transferring of the user session into the FrontendUser object
itself, once this is not using superglobals instead anymore.

Additional cleanups on the Authentication object will follow separately
once all Middlewares and the Request object are in place.

For now, this patch aims to extract the logic and keep maximum backwards-
compatibility.

Resolves: #83936
Releases: master
Change-Id: Id51b49f41336717fde4606a71ec6b2c805662b88
Reviewed-on: https://review.typo3.org/55753
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/frontend/Classes/Http/RequestHandler.php
typo3/sysext/frontend/Classes/Middleware/FrontendUserAuthenticator.php [new file with mode: 0644]
typo3/sysext/frontend/Configuration/RequestMiddlewares.php