=== Task 3: Auth Module Verification === --- Test 1: JWT Generation --- Token generated: eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ0ZXN0LWNsaWVudC1pZ... Token parts: 3 (expected: 3) Header: {"alg":"HS256"} alg === HS256: true Payload: {"iss":"test-client-id","sub":"admin","aud":"","iat":1773411970,"exp":1773412570} iss === clientId: true sub === user: true aud === empty string: true iat clock skew: 30s from now (expected ~30): true exp === iat + tokenLifetime: true token lifetime: 600 seconds (expected: 600 ) --- Test 2: Sandbox Headers --- Sandbox headers: {"Content-Type":"application/json"} Has Content-Type: true No Authorization: true No x-xtrem-endpoint: true --- Test 3: Authenticated Headers --- Auth headers keys: [ "Content-Type", "Authorization", "x-xtrem-endpoint" ] Has Authorization: true Has x-xtrem-endpoint: true Has Content-Type: true --- Test 4: Missing credentials error --- Correctly threw: Cannot generate JWT: clientId, secret, and user are required === All verifications complete ===