feat(altcha): add altcha validation layer to login
Some checks reported warnings
Cadoles/hydra-sql/pipeline/pr-develop This commit is unstable

This commit is contained in:
2025-03-24 17:20:17 +01:00
parent 1cb5ae6bc3
commit 9cc4c7ac74
40 changed files with 565 additions and 108 deletions

View File

@ -5,6 +5,7 @@ twig:
default_path: "%kernel.project_dir%/templates"
form_themes:
- "bootstrap_5_layout.html.twig"
- "altcha.html.twig"
when@test:
twig:
strict_variables: true

View File

@ -2,6 +2,10 @@ controllers:
resource: ../../src/Controller/
type: annotation
controllers_flag:
resource: ../../src/Flag/Controller/
type: annotation
kernel:
resource: ../../src/Kernel.php
type: annotation

View File

@ -75,3 +75,28 @@ services:
$securityPattern: '%security_pattern%'
# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones
App\Altcha\Form\AltchaType:
arguments:
$altchaHost: "%env(ALTCHA_HOST)%"
$altchaBaseUrl: "%env(ALTCHA_BASE_URL)%"
$altchaDebug: "%env(bool:ALTCHA_DEBUG)%"
$altchaWorkers: "%env(ALTCHA_WORKERS)%"
$altchaDelay: "%env(ALTCHA_DELAY)%"
$altchaMockError: "%env(bool:ALTCHA_MOCK_ERROR)%"
tags:
- { name: form.type, alias: altcha}
App\Form\LoginType:
arguments:
$altchaEnabled: "%env(bool:ALTCHA_ENABLED)%"
App\Altcha\AltchaValidator:
arguments:
$altchaHost: "%env(ALTCHA_HOST)%"
$altchaBaseUrl: "%env(ALTCHA_BASE_URL)%"
Predis\ClientInterface:
class: 'Predis\Client'
arguments:
- 'tcp://redis:6379'