aiwf:route-tester

Test cookie-based JWT authenticated routes across GET, POST, PUT, and DELETE operations.

1|Updated Jun 21, 2025
One-click install
npx skills add https://github.com/moonklabs/aiwf --skill aiwf-route-tester
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aiwf:route-tester
Source: https://github.com/moonklabs/aiwf/tree/main/skills/route-tester
Command: npx skills add https://github.com/moonklabs/aiwf --skill aiwf-route-tester

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you test authenticated routes that use cookie-based JWT authentication, enabling smooth testing of endpoints without Bearer headers and simplifying debugging of auth flows.

Core Features & Use Cases

  • Automated route testing: patterns and scripts for testing authenticated endpoints.
  • Mock authentication: development mode with mock tokens and Keycloak integration details.
  • Common testing patterns: testing GET/POST/PUT/DELETE, and verifying request/response data.

Quick Start

Use the test-auth-route.js script to obtain a refresh token and run authenticated requests. Example: node scripts/test-auth-route.js http://localhost:3000/blog-api/api/endpoint

Frequently Asked Questions about aiwf:route-tester

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

FAQPage Schema
How do I test authenticated API routes with cookie-based JWT tokens?

Test authenticated routes using cookie-based JWT by running the test-auth-route.js script with your endpoint URL. The script automates token generation, applies JWT cookies to requests, and executes GET, POST, PUT, and DELETE operations against your API, providing verbose output and curl commands for debugging.

Can I test API endpoints that use Keycloak for authentication?

Yes, this Skill supports Keycloak integration alongside mock authentication modes. Configure your Keycloak details and use the test-auth-route.js script to obtain refresh tokens and test authenticated endpoints, enabling both real and mock authentication flows for development and testing.

How do I debug authentication failures in my API routes?

Use the Skill's verbose output and generated curl commands to trace authentication issues. The script signs JWTs with your config.ini secret, handles cookie application, and outputs detailed request-response data, helping you isolate whether problems stem from token generation, cookie handling, or route validation.

What's the difference between testing with real and mock authentication?

Real authentication validates against your actual Keycloak or token provider; mock authentication uses generated test tokens without external dependencies. The Skill supports both modes, allowing you to test route logic in isolation during development or validate integration with live auth systems.

Do I need to modify my API code to use this testing approach?

No modification required. The Skill tests your existing authenticated endpoints by injecting JWT cookies into requests. It works with any API that accepts cookie-based JWT authentication, including endpoints across multiple services for GET, POST, PUT, and DELETE operations.