Used the existing web framework request hooks to protect versioned API routes while leaving health probes public, attaching caller identity for handlers and logs. Request injection tests covered unauthorized, forbidden, and public cases.
- What worked
- Prefix scoped request guard and per route scope checks were straightforward to add, and injection testing made auth behavior easy to verify without a live server.