File tree 1 file changed +4
-2
lines changed 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,8 @@ a traditional HTML form that submits to ``/login``:
191
191
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator implements PasswordAuthenticatedInterface
192
192
{
193
193
use TargetPathTrait;
194
+
195
+ public const LOGIN_ROUTE = 'app_login';
194
196
195
197
private $entityManager;
196
198
private $urlGenerator;
@@ -207,7 +209,7 @@ a traditional HTML form that submits to ``/login``:
207
209
208
210
public function supports(Request $request)
209
211
{
210
- return 'app_login' === $request->attributes->get('_route')
212
+ return self::LOGIN_ROUTE === $request->attributes->get('_route')
211
213
&& $request->isMethod('POST');
212
214
}
213
215
@@ -260,7 +262,7 @@ a traditional HTML form that submits to ``/login``:
260
262
261
263
protected function getLoginUrl()
262
264
{
263
- return $this->urlGenerator->generate('app_login' );
265
+ return $this->urlGenerator->generate(self::LOGIN_ROUTE );
264
266
}
265
267
}
266
268
You can’t perform that action at this time.
0 commit comments