Posts

Consuming API from web application using OAuth 2.0

Image
This post will guide you to get a clear understanding of OAuth 2.0 (Open Authorization) along with an example of how you can implement the OAuth flow in order to consume the facebook API from your web application. A simple introduction to OAuth2 OAuth2 allows to share limited resources between sites without exposing the user credentials. It is a secure protocol which we can use to retrieve information in a reliable manner. It provides, Federated Identity delegated Authority OAuth Grant Types - In OAuth there are four ways that client could obtain the access token. These ways are known as OAuth grant types. Authorization Code Grant Type Implicit Grant Type Password Protect Grant Type Client Credentials Grant Type                         Authorization Grant Flow Client sends an authorization request to the Authorization server   Authorization server requests user consent from t...

Simple REST API using Node,Express and MongoDB

Image
This is a beginners guide  to create a simple REST API which contains basic CRUD operations(Create,Read,Update,Delete) using Node.js,Express js framework and MongoDB. Prerequisites         Node js         MongoDB         WebStrome (IDE)         RESTClient- to test the REST API Creating the API Open your WebStrome IDE and Go to File ->New -> Project >Empty Project Select  the location you want to create the project and hit Create button. Folder Structure Demo |_______DBSchema                   |_____DBConfig |_______UserController                   |_____Controller.js                   |_____User.Route.js |_______app.j...