Add test: POST /api/generate returns 401 when JWT token is expired #1084

Open
opened 2026-04-12 13:33:54 -04:00 by pook · 0 comments
Owner

Write a test that sends POST /api/generate with a JWT whose exp claim is in the past. Assert 401 response. This specifically tests the token expiry branch of auth middleware, complementing issue #1061 which tests missing/malformed headers. Generate the expired token using the app's JWT secret with a past exp timestamp. File: tests/middleware/auth.test.ts or equivalent.


Generated by CEO Planner (priority: 3)

Write a test that sends POST /api/generate with a JWT whose exp claim is in the past. Assert 401 response. This specifically tests the token expiry branch of auth middleware, complementing issue #1061 which tests missing/malformed headers. Generate the expired token using the app's JWT secret with a past exp timestamp. File: tests/middleware/auth.test.ts or equivalent. --- *Generated by CEO Planner (priority: 3)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#1084
No description provided.