chore(deps): secure PHP 8.3 dependency baseline
This commit is contained in:
@@ -61,7 +61,7 @@ test('api unknown route returns unified not_found json without hitting locale mi
|
||||
|
||||
test('player me works with main site jwt when dev bypass is off', function () {
|
||||
config(['lottery.player_auth.dev_bypass' => false]);
|
||||
config(['lottery.main_site.sso_jwt_secret' => 'jwt-test-secret']);
|
||||
config(['lottery.main_site.sso_jwt_secret' => 'jwt-test-secret-at-least-32-bytes-long']);
|
||||
|
||||
$player = Player::query()->create([
|
||||
'site_code' => 'main',
|
||||
@@ -78,7 +78,7 @@ test('player me works with main site jwt when dev bypass is off', function () {
|
||||
'site_player_id' => 'jwt-user-1',
|
||||
'iat' => $now,
|
||||
'exp' => $now + 300,
|
||||
], 'jwt-test-secret', 'HS256');
|
||||
], 'jwt-test-secret-at-least-32-bytes-long', 'HS256');
|
||||
|
||||
$this->withHeader('Authorization', 'Bearer '.$jwt)
|
||||
->getJson('/api/v1/player/me')
|
||||
@@ -88,7 +88,7 @@ test('player me works with main site jwt when dev bypass is off', function () {
|
||||
|
||||
test('jwt first successful login auto-registers player mapping', function () {
|
||||
config(['lottery.player_auth.dev_bypass' => false]);
|
||||
config(['lottery.main_site.sso_jwt_secret' => 'jwt-test-secret']);
|
||||
config(['lottery.main_site.sso_jwt_secret' => 'jwt-test-secret-at-least-32-bytes-long']);
|
||||
|
||||
expect(Player::query()->count())->toBe(0);
|
||||
|
||||
@@ -98,7 +98,7 @@ test('jwt first successful login auto-registers player mapping', function () {
|
||||
'site_player_id' => 'brand-new-sso-1',
|
||||
'iat' => $now,
|
||||
'exp' => $now + 300,
|
||||
], 'jwt-test-secret', 'HS256');
|
||||
], 'jwt-test-secret-at-least-32-bytes-long', 'HS256');
|
||||
|
||||
$response = $this->withHeader('Authorization', 'Bearer '.$jwt)
|
||||
->getJson('/api/v1/player/me')
|
||||
|
||||
@@ -46,14 +46,14 @@ test('wallet transfer-out with empty bearer token returns 8001', function (): vo
|
||||
|
||||
test('wallet transfer-in rejects expired jwt when dev bypass is off', function (): void {
|
||||
config(['lottery.player_auth.dev_bypass' => false]);
|
||||
config(['lottery.main_site.sso_jwt_secret' => 'unit-test-jwt-secret-for-expiry']);
|
||||
config(['lottery.main_site.sso_jwt_secret' => 'unit-test-jwt-secret-for-expiry-32-bytes']);
|
||||
|
||||
$token = JWT::encode([
|
||||
'site_code' => 'main',
|
||||
'site_player_id' => 'expired-jwt-user',
|
||||
'iat' => now()->subHours(2)->timestamp,
|
||||
'exp' => now()->subMinute()->timestamp,
|
||||
], 'unit-test-jwt-secret-for-expiry', 'HS256');
|
||||
], 'unit-test-jwt-secret-for-expiry-32-bytes', 'HS256');
|
||||
|
||||
$this->withHeader('Authorization', 'Bearer '.$token)
|
||||
->postJson('/api/v1/wallet/transfer-in', [
|
||||
|
||||
Reference in New Issue
Block a user