[SECURITY] Small refactor in Authenticator.php, to remove unused services

This commit is contained in:
Hugo Sales 2020-07-25 02:07:46 +00:00 committed by Hugo Sales
parent c973517397
commit e0cc125907
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0

View File

@ -23,7 +23,6 @@ use App\Core\DB\DB;
use function App\Core\I18n\_m;
use App\Entity\User;
use App\Util\Nickname;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
@ -54,13 +53,11 @@ class Authenticator extends AbstractFormLoginAuthenticator
public const LOGIN_ROUTE = 'login';
private $entityManager;
private $urlGenerator;
private $csrfTokenManager;
public function __construct(EntityManagerInterface $entityManager, UrlGeneratorInterface $urlGenerator, CsrfTokenManagerInterface $csrfTokenManager)
public function __construct(UrlGeneratorInterface $urlGenerator, CsrfTokenManagerInterface $csrfTokenManager)
{
$this->entityManager = $entityManager;
$this->urlGenerator = $urlGenerator;
$this->csrfTokenManager = $csrfTokenManager;
}