Demonstrating a solution for complete mediation in a Node.js application.
Watch me build this application in my blog post on Securing your Node API.
This application uses JSON Web Tokens for authentication and implements custom authorization for data.
It is a simple banking REST API that allows a user to perform transfers, deposits, withdraws, and balance inquiries.
Use it as a starting point for investigating different authorization models for your API and see which one fits your application!