From 531edfe3a43b246712f38728607fda1cfaa49062 Mon Sep 17 00:00:00 2001 From: Nathan Boiron Date: Tue, 12 Dec 2023 23:40:46 +0100 Subject: [PATCH] ajout de return requis par l'interface --- sources/AppBundle/Security/LegacyAuthenticator.php | 2 ++ sources/AppBundle/Security/LegacyHashAuthenticator.php | 2 ++ sources/AppBundle/Security/TestGithubAuthenticator.php | 4 +--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sources/AppBundle/Security/LegacyAuthenticator.php b/sources/AppBundle/Security/LegacyAuthenticator.php index 40050c03e..d497d965a 100644 --- a/sources/AppBundle/Security/LegacyAuthenticator.php +++ b/sources/AppBundle/Security/LegacyAuthenticator.php @@ -70,6 +70,8 @@ public function checkCredentials($credentials, UserInterface $user) public function onAuthenticationFailure(Request $request, AuthenticationException $exception) { $request->getSession()->getFlashBag()->add('error', "Utilisateur et/ou mot de passe incorrect"); + + return null; } /** diff --git a/sources/AppBundle/Security/LegacyHashAuthenticator.php b/sources/AppBundle/Security/LegacyHashAuthenticator.php index 6482ca4db..9ea9d5bdd 100644 --- a/sources/AppBundle/Security/LegacyHashAuthenticator.php +++ b/sources/AppBundle/Security/LegacyHashAuthenticator.php @@ -62,6 +62,8 @@ public function checkCredentials($credentials, UserInterface $user) public function onAuthenticationFailure(Request $request, AuthenticationException $exception) { $request->getSession()->getFlashBag()->add('error', "Utilisateur et/ou mot de passe incorrect"); + + return null; } /** diff --git a/sources/AppBundle/Security/TestGithubAuthenticator.php b/sources/AppBundle/Security/TestGithubAuthenticator.php index 41cef4e37..e5220eda0 100644 --- a/sources/AppBundle/Security/TestGithubAuthenticator.php +++ b/sources/AppBundle/Security/TestGithubAuthenticator.php @@ -106,11 +106,9 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio return new JsonResponse($data, 403); } - /** - * @inheritDoc - */ public function onAuthenticationSuccess(Request $request, TokenInterface $token, $providerKey) { + return null; } /**