- Add TestKernel that removes the kernel.reset tag from nonceCache, rateLimitCache, sessionCache and sessionStorage pools so in-memory state survives across requests within a single test (mirroring APCu persistence in production) - Add config/packages/test/ with array cache adapters and test session config - Set fixed TOTP secret (JBSWY3DPEHPK3PXP) and high rate limits in phpunit.dist.xml and .env.test so functional tests can compute valid codes and are not rate-limited - Make Kernel non-final so TestKernel can extend it - Fix testFailedLoginWithSpentNonceIsRejected and testConsumedBackupCodeCannotBeReused: clear the CookieJar between sub-requests so a session cookie set by a prior successful login does not auto-authenticate the next request via AcceptListener before the nonce/backup-code path is exercised
28 lines
712 B
Bash
28 lines
712 B
Bash
APP_ENV=test
|
|
APP_DEBUG=0
|
|
APP_SECRET=test_secret_key_change_me
|
|
# fixed TOTP secret (JBSWY3DPEHPK3PXP) so functional tests can compute valid codes
|
|
TOTP_URI='otpauth://totp/Test-TOTP?secret=JBSWY3DPEHPK3PXP'
|
|
COOKIE_TTL=2592000
|
|
SUBDOMAIN_REDIRECT=0
|
|
AUTH_SUBDOMAIN=''
|
|
IP_TTL=0
|
|
TEAPOT=1
|
|
BURST_COUNT=10
|
|
BURST_TIME=30
|
|
UPPER_COUNT=100
|
|
UPPER_TIME=3600
|
|
TITLE='Pre-Authentication System'
|
|
BG_COLOR='#029386'
|
|
FG_COLOR='#ffffff'
|
|
ERROR_COLOR='#ffb16d'
|
|
ID_NAME='Session ID'
|
|
TOKEN_NAME='Authentication Token'
|
|
SUBMIT_NAME='Submit'
|
|
ERROR_MESSAGE='Unsuccessful login attempt'
|
|
TEAPOT_TITLE="I'm a teapot"
|
|
TEAPOT_MESSAGE='I refuse to brew coffee'
|
|
TOO_MANY_TITLE='Too many requests'
|
|
TOO_MANY_MESSAGE='Try again later'
|
|
SHELL_VERBOSITY=0
|