EmailTokenAuthenticator.php
2.15 KB
-
Prepare Symfony 6 on Symfony 5.4: authenticators, mailer, session, twig/extensions · 47c7200a
- Security: authenticator manager instead of Guard (LoginAuthenticator, EmailTokenAuthenticator, ApiKeyAuthenticator), UserAuthenticatorInterface for programmatic logins, password_hashers, PUBLIC_ACCESS, new UsernamePasswordToken signature, loadUserByIdentifier, getUserIdentifier. - Role choice while impersonating: rebuild the SwitchUserToken (was a 500 error since Symfony 5: getRoles()/SwitchUserRole no longer exist). - Unknown email token: 401 instead of a 500 error. - LoginListener listens to LoginSuccessEvent and uses the request session. - Session: RequestStack::getSession() instead of the session service (removed in Symfony 6) in 36 classes. - SwiftMailer replaced by symfony/mailer (MAILER_DSN instead of MAILER_URL). DeferredMailer sends after the response and logs the errors, like the former memory spool. - twig/extensions removed: the truncate filter is ported in App\Twig\TextExtension. - Tests: AuthenticationTest (remember me, API key, email token, role choice while impersonating), email assertions, DeferredMailer and truncate unit tests.
Damien Moulard authored
×