Review 13.4 Merged

88026[TASK] Provide public method to create anonymous user session

Benni Mack CR +2 V +2 Easy +15 −3 updated 02/05/25, 08:51

Commit message

With #100307 new PSR-14 events have been introduced to
allow implementation of custom logic for classes extending
`\TYPO3\CMS\Core\Authentication\AbstractUserAuthentication`.

The PSR-14 event `BeforeUserLogoutEvent` allows to control,
if the logout process should be handled by
`AbstractUserAuthentication`. If an extension author decides
to implement a custom logout process by using the PSR-14
event `AfterUserLoggedOutEvent`, it is currently not possible
to use a public API method to create an anonymous user
session. Instead, extension authors can use the internal
method `initializeUserSessionManager` to.

In order to provide a public API method to create an
anonymous user session, this change adds the method
`createAnonymousSession` to `AbstractUserAuthentication`.
The method is now additionally used internally in the class
to create an anonymous user session where required.

Review

  • Code review CR +2 Done
    • Benni Mack +2
  • Verified V +2 Done
    • Benni Mack +2
    • core-ci +1 CI

Issues 1

Files 1

Review log 34

  1. Benni Mack commented on patch set 1 02/05/25, 07:29

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 02/05/25, 07:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/73557

  3. Benni Mack voted on patch set 1 CR +2 V +2 02/05/25, 08:51

  4. Benni Mack merged patch set 2 02/05/25, 08:51