feat(Prestaire.php): Implémente UserInterface et PasswordAuthenticatedUserInterface.

 feat(security): Ajoute firewall et authentificateur pour ETL.

 feat(EtlController.php): Ajoute contrôleur et routes pour ETL.

 feat(RedirecListener.php): Ajoute redirection pour etl.ludikevent.fr.

✏️ chore(caddy): Ajoute etl.ludikevent.fr à la configuration Caddy.
```
This commit is contained in:
Serreau Jovann
2026-01-29 17:32:03 +01:00
parent 0be11d03f1
commit dbd806a595
7 changed files with 266 additions and 4 deletions

View File

@@ -0,0 +1,65 @@
<?php
namespace App\Controller;
use App\Entity\Account;
use App\Entity\AccountResetPasswordRequest;
use App\Entity\Contrats;
use App\Entity\ContratsPayments;
use App\Entity\Customer;
use App\Entity\CustomerAddress;
use App\Form\RequestPasswordConfirmType;
use App\Form\RequestPasswordRequestType;
use App\Logger\AppLogger;
use App\Repository\ContratsRepository;
use App\Repository\CustomerAddressRepository;
use App\Repository\CustomerRepository;
use App\Service\Mailer\Mailer;
use App\Service\Pdf\ContratPdfService;
use App\Service\Pdf\PlPdf;
use App\Service\ResetPassword\Event\ResetPasswordConfirmEvent;
use App\Service\ResetPassword\Event\ResetPasswordEvent;
use App\Service\Signature\Client;
use Doctrine\ORM\EntityManagerInterface;
use Google\Service\Directory\UserAddress;
use Symfony\Bundle\SecurityBundle\Security;
use KnpU\OAuth2ClientBundle\Client\ClientRegistry;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Vich\UploaderBundle\Templating\Helper\UploaderHelper;
class EtlController extends AbstractController
{
#[Route('/etl', name: 'etl_home')]
public function eltHome(AuthenticationUtils $authenticationUtils): Response
{
if(!$this->getUser())
return $this->redirectToRoute('etl_login');
}
#[Route('/etl/connexion', name: 'etl_login')]
public function eltLogin(AuthenticationUtils $authenticationUtils): Response
{
return $this->render('etl/login.twig',[
'last_username' => $authenticationUtils->getLastUsername(),
'error' => $authenticationUtils->getLastAuthenticationError()
]);
}
#[Route('/etl/logout', name: 'etl_logout')]
public function eltLogout(): Response
{
return $this->redirectToRoute('etl_home');
}
}