OAuth 2.0 with Node.js and Expree.js
Open Authentication System 2.0
Step 01:
Get a Client Id and Client Secret for developer
https://photopher-js-team.hero....kuapp.com/client-rou
Step 02:
Create username and password for an Photographer
https://photopher-js-team.hero....kuapp.com/photograph (POST)
content-type: application/json
Data:
{
"username": "Eminem",
"password": "D-12"
}
Step 03:
Try to get the list of Photographers
https://photopher-js-team.hero....kuapp.com/photograph (GET)
Get error for not providing the token
Step 04:
Get the token Using the username, password, ClientId and ClientSecret
https://photopher-js-team.hero....kuapp.com/auth/authe (POST)
Data:
{
"username": "Eminem",
"password": "D-12",
"clientId": "6JnZl9j5lS",
"clientSecret": "YKs5IIoowjkHPhhQyiIE"
}
Step 05:
https://photopher-js-team.hero....kuapp.com/photograph (GET)
x-access-token: Received Token
Output: List of the Photographers
*** For now we are skipping the password encryption system
THANK YOU
Source Code: https://bitbucket.org/bmshamsnahid/photopher
-
Category
No comments found