route-tester

Test authenticated routes using cookie-based JWT authentication with test-auth-route.js.

4|Updated Nov 1, 2025
One-click install
npx skills add https://github.com/weirdgme/claude-code-infrastructure-showcase --skill route-tester-weirdgme
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: route-tester
Source: https://github.com/weirdgme/claude-code-infrastructure-showcase/tree/main/.claude/skills/route-tester
Command: npx skills add https://github.com/weirdgme/claude-code-infrastructure-showcase --skill route-tester-weirdgme

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you test authenticated routes in your project that rely on cookie-based JWT authentication, providing patterns and scripts to automate login and request flows.

Core Features & Use Cases

  • Test-auth-route.js (RECOMMENDED) automates obtaining a refresh token, signing the JWT with your secret, and making authenticated requests.
  • Manual curl with token demonstrates how to reproduce requests with a signed cookie.
  • Mock Authentication (Development Only) enables rapid testing without real authentication.
  • Common Use Case: validate the authentication flow and access controls across protected endpoints.

Quick Start

Run the test-auth-route.js script against a target URL, or enable mock authentication in development to test endpoints without an actual Keycloak setup.

Frequently Asked Questions about route-tester

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test authenticated routes with JWT tokens in cookies?

Test authenticated routes by using test-auth-route.js to automate token retrieval, sign the JWT with your config.ini secret, and make requests with the signed cookie. The script outputs detailed request/response data and a reproducible curl command for validation.

Can I test API endpoints without setting up real Keycloak authentication?

Yes, enable mock-auth mode for development to test endpoints without a real Keycloak setup. This allows rapid iteration on route logic and access controls before deploying authenticated endpoints.

How do I reproduce an authenticated request with curl?

Use the curl command generated by test-auth-route.js, which includes the signed JWT cookie. The script automates cookie signing with your secret and outputs the exact curl syntax needed to replicate the authenticated request manually.

What authentication issues can I debug with this approach?

Debug cookie-based JWT authentication flows, token expiration, refresh token handling, and access control failures across protected endpoints. The detailed request/response output pinpoints where authentication or authorization breaks in POST/PUT/DELETE operations.

Can I test authenticated routes across multiple services?

Yes, test POST/PUT/DELETE operations across multiple services by running test-auth-route.js against different target URLs. Each run automates the full authentication workflow and outputs reproducible curl commands for cross-service validation.

Do I need to manually sign JWTs for testing?

No, test-auth-route.js handles JWT signing automatically using the secret from config.ini. You provide the target URL and the script manages token retrieval, signing, and cookie creation for authenticated requests.