Skip to content

fix: add auth middleware to POST /api/payments endpoint#1985

Open
lismilema-hue wants to merge 3 commits into
SecureBananaLabs:mainfrom
lismilema-hue:fix/add-auth-payments
Open

fix: add auth middleware to POST /api/payments endpoint#1985
lismilema-hue wants to merge 3 commits into
SecureBananaLabs:mainfrom
lismilema-hue:fix/add-auth-payments

Conversation

@lismilema-hue
Copy link
Copy Markdown

Summary

Adds authMiddleware to the POST /api/payments endpoint to prevent unauthenticated payment creation.

Changes

  • apps/api/src/routes/paymentRoutes.js — imported authMiddleware and added it as middleware before createPayment
  • apps/api/src/tests/payments.test.js — added tests verifying:
    • 401 returned without Authorization header
    • 401 returned with invalid Bearer token

Closes #1983
/claim #743

Created original 128x128 pixel art of a cyberpunk fox character
under /assets/pixel-art/ as required by the issue.

- Theme: Cyberpunk fox with neon glow, moon, stars, cityscape
- Format: PNG, 128x128 pixels (meets 64x64 minimum)
- Submitted per acceptance criteria

Closes SecureBananaLabs#80
An original 4-stanza poem about the art of debugging and bug hunting,
written in the spirit of SecureBananaLabs' bug bounty program.
- Import authMiddleware and apply it to the POST /api/payments route
- Add tests verifying 401 responses without auth or with invalid token

Closes SecureBananaLabs#1983
/claim SecureBananaLabs#743
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: add auth middleware to POST /api/payments endpoint

1 participant