You now have the client side code for getting a token to your restricted resource. The next step is to secure your web API ...

You now have the client side code for getting a token to your restricted resource. The next step is to secure your web API so only those with valid access tokens can access restricted resources.  Microsoft offers our .NET OWIN and node.js Passport libraries to help you with this.  The samples below will walk you through the necessary steps to integrate these libraries into your web API.