feat(security): Crée AccessDeniedHandler et AuthenticationEntryPoint pour gérer l'accès.

♻️ refactor(security): Remplace `custom_authenticators` par `custom_authenticator`.
⚙️ chore(framework): Active le cache HTTP et configure la session.
This commit is contained in:
Serreau Jovann
2025-11-22 22:58:59 +01:00
parent af21127ce2
commit 5f77fa5b37
4 changed files with 101 additions and 4 deletions

View File

@@ -2,8 +2,14 @@
framework:
secret: '%env(APP_SECRET)%'
session: true
http_cache:
enabled: true
default_ttl: 3600
stale_while_revalidate: 3600
stale_if_error: 3600
session:
cookie_secure: auto
cookie_samesite: lax
#esi: true

View File

@@ -24,8 +24,8 @@ security:
check_path: app_login # L'URL où le formulaire POST sera soumis
enable_csrf: true # Active la protection CSRF
csrf_token_id: authenticate # ID du jeton CSRF (doit correspondre à celui dans votre Twig)
entry_point: App\Security\LoginFormAuthenticator
custom_authenticators:
entry_point: App\Security\AuthenticationEntryPoint
custom_authenticator:
- App\Security\LoginFormAuthenticator