1515use Symfony \Component \HttpFoundation \RedirectResponse ;
1616use Symfony \Component \HttpFoundation \Request ;
1717use Symfony \Component \Security \Core \Authentication \Token \TokenInterface ;
18- use Symfony \Component \Security \Core \Encoder \UserPasswordEncoderInterface ;
1918use Symfony \Component \Security \Core \Exception \AuthenticationException ;
20- use Symfony \Component \Security \Core \Exception \BadCredentialsException ;
2119use Symfony \Component \Security \Core \Security ;
22- use Symfony \Component \Security \Core \User \UserInterface ;
23- use Symfony \Component \Security \Core \User \UserProviderInterface ;
2420
2521/**
2622 * A base class to make form login authentication easier!
3026abstract class AbstractFormLoginAuthenticator extends AbstractGuardAuthenticator
3127{
3228 /**
33- * Return the URL to the login page
29+ * Return the URL to the login page.
3430 *
3531 * @return string
3632 */
@@ -40,17 +36,18 @@ abstract protected function getLoginUrl();
4036 * The user will be redirected to the secure page they originally tried
4137 * to access. But if no such page exists (i.e. the user went to the
4238 * login page directly), this returns the URL the user should be redirected
43- * to after logging in successfully (e.g. your homepage)
39+ * to after logging in successfully (e.g. your homepage).
4440 *
4541 * @return string
4642 */
4743 abstract protected function getDefaultSuccessRedirectUrl ();
4844
4945 /**
50- * Override to change what happens after a bad username/password is submitted
46+ * Override to change what happens after a bad username/password is submitted.
5147 *
52- * @param Request $request
48+ * @param Request $request
5349 * @param AuthenticationException $exception
50+ *
5451 * @return RedirectResponse
5552 */
5653 public function onAuthenticationFailure (Request $ request , AuthenticationException $ exception )
@@ -62,11 +59,12 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio
6259 }
6360
6461 /**
65- * Override to change what happens after successful authentication
62+ * Override to change what happens after successful authentication.
6663 *
67- * @param Request $request
64+ * @param Request $request
6865 * @param TokenInterface $token
69- * @param string $providerKey
66+ * @param string $providerKey
67+ *
7068 * @return RedirectResponse
7169 */
7270 public function onAuthenticationSuccess (Request $ request , TokenInterface $ token , $ providerKey )
@@ -91,8 +89,9 @@ public function supportsRememberMe()
9189 * Override to control what happens when the user hits a secure page
9290 * but isn't logged in yet.
9391 *
94- * @param Request $request
92+ * @param Request $request
9593 * @param AuthenticationException|null $authException
94+ *
9695 * @return RedirectResponse
9796 */
9897 public function start (Request $ request , AuthenticationException $ authException = null )
0 commit comments