Routes that deny by default
Lesson 5 of 27 · Access and identity · 2 min Get the course to watchYou ask the assistant for a refund endpoint and it writes a good one. It refunds the payment, records the reason and returns a receipt. It also forgot the login decorator, and nothing in the project noticed.
When protection is something each route must remember, the holes you should expect equal the number of routes times the chance of forgetting. Flip the default and the forgetting stops mattering.
The rest of this lesson
- One gate for every route
- What it looks like
- Roles are a second gate
- Test the inventory
- What to keep
The full lesson is animated and narrated, with a short quiz, and you can pause it to ask a question. It comes with Secure the code AI writes.