Skip to content

Commit

Permalink
Fix AbstractFormLoginAuthenticator return types (fixes #47571).
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AndrolGenhald authored and fabpot committed Sep 23, 2022
1 parent cf8922b commit f199eb1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Authenticator/AbstractFormLoginAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
{
Expand All @@ -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)
{
Expand Down

0 comments on commit f199eb1

Please sign in to comment.