You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -171,10 +186,9 @@ a traditional HTML form that submits to ``/login``:
171
186
172
187
use App\Entity\User;
173
188
use Doctrine\ORM\EntityManagerInterface;
174
-
175
189
use Symfony\Component\HttpFoundation\RedirectResponse;
176
190
use Symfony\Component\HttpFoundation\Request;
177
-
use Symfony\Component\Routing\RouterInterface;
191
+
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
178
192
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
179
193
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
180
194
use Symfony\Component\Security\Core\Exception\CustomUserMessageAuthenticationException;
@@ -185,21 +199,22 @@ a traditional HTML form that submits to ``/login``:
185
199
use Symfony\Component\Security\Csrf\CsrfToken;
186
200
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
187
201
use Symfony\Component\Security\Guard\Authenticator\AbstractFormLoginAuthenticator;
202
+
use Symfony\Component\Security\Guard\PasswordAuthenticatedInterface;
188
203
use Symfony\Component\Security\Http\Util\TargetPathTrait;
189
204
190
-
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
205
+
class LoginFormAuthenticator extends AbstractFormLoginAuthenticator implements PasswordAuthenticatedInterface
191
206
{
192
207
use TargetPathTrait;
193
208
194
209
private $entityManager;
195
-
private $router;
210
+
private $urlGenerator;
196
211
private $csrfTokenManager;
197
212
private $passwordEncoder;
198
213
199
-
public function __construct(EntityManagerInterface $entityManager, RouterInterface $router, CsrfTokenManagerInterface $csrfTokenManager, UserPasswordEncoderInterface $passwordEncoder)
214
+
public function __construct(EntityManagerInterface $entityManager, UrlGeneratorInterface $urlGenerator, CsrfTokenManagerInterface $csrfTokenManager, UserPasswordEncoderInterface $passwordEncoder)
200
215
{
201
216
$this->entityManager = $entityManager;
202
-
$this->router = $router;
217
+
$this->urlGenerator = $urlGenerator;
203
218
$this->csrfTokenManager = $csrfTokenManager;
204
219
$this->passwordEncoder = $passwordEncoder;
205
220
}
@@ -247,23 +262,31 @@ a traditional HTML form that submits to ``/login``:
0 commit comments