- Added AltchaService class for managing ALTCHA captcha challenges and solutions. - Created CaptchaController to handle API requests for generating challenges. - Introduced CaptchaGuard for validating captcha solutions on public endpoints. - Developed unit tests for AltchaService to ensure challenge creation and solution verification functionality. - Implemented integration tests for the Captcha API endpoint and captcha bypass behavior when disabled. - Added documentation for the Captcha API in the corresponding markdown file.
15 lines
639 B
Bash
15 lines
639 B
Bash
# define your env variables for the test env here
|
|
KERNEL_CLASS='App\Kernel'
|
|
APP_SECRET='$ecretf0rt3st'
|
|
|
|
# Test DB: doctrine's when@test config appends the `_test` suffix (see
|
|
# config/packages/doctrine.yaml), so this base name `db` becomes `db_test`.
|
|
# That database is created in ddev and granted to user `db`.
|
|
DATABASE_URL="mysql://db:db@db:3306/db?serverVersion=8.0&charset=utf8mb4"
|
|
|
|
# JWT — generated keypair is shared with dev; passphrase from .env is fine.
|
|
# Redis cache/messenger use the same ddev redis; tests don't depend on it.
|
|
|
|
# ALTCHA off in tests so public endpoints stay drivable without solving PoW.
|
|
ALTCHA_ENABLED=false
|