RESTful API
RESTful API In this blog post I am going to show how to create a resource server api. First we need to understand how it works. We can use exiting authorization sever or like there you can create your own authorization sever and resource server both in a single api. Sample code is uploaded to my github LINK : " " This is written using node.js. In order to run this on your computer you have to have node.js installed on your comouter. app.js This app tuns on port 4000. You can give any port number here.There are two endpoints which I have created in this. One to get the access token which is "/oauth/token" and the other one is to get resources which is "/profile". As resources I have hard-coded one value which is name ("pasan") and this comes as a JSON object model.js (username = test, password = test) All the functions that handle requests from client are written here. Run ...