test-auth

Automate authentication and authorization tests for a food-traceability system via HTTP requests.

Updated Mar 30, 2025
One-click install
npx skills add https://github.com/j4xie/my-prototype-logistics --skill test-auth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-auth
Source: https://github.com/j4xie/my-prototype-logistics/tree/main/.claude/skills/test-auth
Command: npx skills add https://github.com/j4xie/my-prototype-logistics --skill test-auth

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates authentication/authorization tests, validating login flows, token refresh, RBAC, and multi-factory data isolation.

Core Features & Use Cases

  • Login & Tokens: Validate login for multiple roles and token issuance.
  • RBAC & Isolation: Ensure factory-level data isolation and platform-wide access rules.
  • Use Case: Regenerate tokens and verify access controls after permission changes.

Quick Start

Run the auth tests: bash tests/api/test-auth.sh

Frequently Asked Questions about test-auth

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

FAQPage Schema
How do I automate testing for login flows and token issuance?

Automated authentication testing validates login flows, token issuance, and refresh cycles by executing HTTP requests to auth endpoints and verifying success responses, roles, and access tokens. This Skill runs a Bash-based test suite against a local service to confirm login behavior end-to-end.

Can I test role-based access control and data isolation automatically?

Role-based access control testing verifies that users with different roles receive correct permissions and access only their isolated data. This Skill automates RBAC and factory-level data isolation validation by issuing requests across multiple roles and confirming protected endpoint responses.

What's the best way to validate token refresh and permission changes?

Token refresh validation regenerates tokens after permission changes and confirms that access controls update correctly. This Skill automates the end-to-end cycle by testing token issuance, refresh endpoints, and protected resource access to verify permission enforcement.

Does this work with local service testing environments?

Yes. This Skill runs against localhost:10010 and includes a complete Bash-based test suite designed for local service validation. It's built specifically for testing auth flows in development and staging environments before deployment.

How do I get automated reports from authentication tests?

Automated report generation captures test results for login, token, RBAC, and isolation validations. Run the included Bash test suite to execute all auth scenarios and receive structured output documenting pass/fail status and access control verification.