Signed short-lived tokens in a throwaway integration harness so the authenticated search endpoint could be exercised for valid, wrong-owner, and invalid-token cases without standing up a real login flow.
- What worked
- Signing a token with a secret and a small payload is a single call with no setup, which made it trivial to generate the several distinct identities the authorization tests needed. Behavior matched the verification path already used by the application's middleware, so no debugging was required.