From f199eb1b19db11ce254b891580728c45a7ccacfd Mon Sep 17 00:00:00 2001 From: AndrolGenhald Date: Wed, 14 Sep 2022 11:41:31 -0500 Subject: [PATCH] Fix AbstractFormLoginAuthenticator return types (fixes #47571). Children of AbstractFormLoginAuthenticator should be allowed to return a `Response` instead of being required to return a `RedirectResponse`. This change matches the return types in the newer AbstractLoginFormAuthenticator. --- Authenticator/AbstractFormLoginAuthenticator.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Authenticator/AbstractFormLoginAuthenticator.php b/Authenticator/AbstractFormLoginAuthenticator.php index f91478b..212ac31 100644 --- a/Authenticator/AbstractFormLoginAuthenticator.php +++ b/Authenticator/AbstractFormLoginAuthenticator.php @@ -13,6 +13,7 @@ use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\Security\Core\Security; use Symfony\Component\Security\Guard\AbstractGuardAuthenticator; @@ -34,7 +35,7 @@ abstract protected function getLoginUrl(); /** * Override to change what happens after a bad username/password is submitted. * - * @return RedirectResponse + * @return Response */ public function onAuthenticationFailure(Request $request, AuthenticationException $exception) { @@ -56,7 +57,7 @@ public function supportsRememberMe() * Override to control what happens when the user hits a secure page * but isn't logged in yet. * - * @return RedirectResponse + * @return Response */ public function start(Request $request, AuthenticationException $authException = null) {