Concept Flow - Protecting routes with auth middleware
Incoming Request
Auth Middleware
Auth OK
Next Route
Response
The request first passes through auth middleware which checks credentials. If valid, it proceeds to the route handler; if not, it sends a 401 Unauthorized response.
