What problem does it solve? Testing authenticated API endpoints requires juggling Keycloak tokens, JWT signing, and cookie headers manually, which slows down route validation and debugging of 401/403/404 errors. ## Core Features & Use Cases - Automated Auth Testing: Use the test-auth-route.js script to obtain Keycloak tokens, sign JWTs, and send cookie-authenticated GET/POST requests in one command. - Mock Authentication: Bypass Keycloak in development by sending X-Mock-Auth headers when MOCK_AUTH is enabled in the service .env file. - Failure Diagnosis: Follow structured checklists for debugging 401, 403, 404, and 500 responses, including token regeneration, route prefix verification, and log inspection. - Use Case: After adding a new POST endpoint to the form service, run test-auth-route.js with the full URL and JSON body, then verify the resulting database rows in MySQL. ## Quick Start Test the route http://localhost:3002/api/workflow/start with a POST body containing a workflowCode using the authenticated route testing pattern.