Compare commits
No commits in common. "0996ce64022f582ec2f9ef246ea1305dd3194974" and "597485586cd682aa4c52c616dd0ab9c89439a31d" have entirely different histories.
0996ce6402
...
597485586c
|
@ -10,6 +10,7 @@ use PDOException;
|
|||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
||||
use Symfony\Component\Security\Core\Exception\AuthenticationException;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
@ -28,12 +29,14 @@ class SQLLoginUserAuthenticator extends AbstractAuthenticator
|
|||
|
||||
protected string $baseUrl;
|
||||
private SQLLoginService $sqlLoginService;
|
||||
private UrlGeneratorInterface $router;
|
||||
private PasswordEncoder $passwordHasher;
|
||||
|
||||
public function __construct(string $baseUrl, SQLLoginService $sqlLoginService, PasswordEncoder $passwordHasher)
|
||||
public function __construct(string $baseUrl, SQLLoginService $sqlLoginService, UrlGeneratorInterface $router, PasswordEncoder $passwordHasher)
|
||||
{
|
||||
$this->baseUrl = $baseUrl;
|
||||
$this->sqlLoginService = $sqlLoginService;
|
||||
$this->router = $router;
|
||||
$this->passwordHasher = $passwordHasher;
|
||||
}
|
||||
|
||||
|
@ -56,7 +59,9 @@ class SQLLoginUserAuthenticator extends AbstractAuthenticator
|
|||
{
|
||||
$request->getSession()->set(Security::AUTHENTICATION_ERROR, $exception);
|
||||
|
||||
return new RedirectResponse($this->baseUrl.'/connect/login-accept');
|
||||
return new RedirectResponse(
|
||||
$this->router->generate('app_login')
|
||||
);
|
||||
}
|
||||
|
||||
public function authenticate(Request $request): Passport
|
||||
|
|
Loading…
Reference in New Issue