emmastrienko / authenticate-user

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

# Practice Statement Authentication and Authorization are the important parts of any application to authorize the user. Authentication is usually done by JWT tokens whereas Authorization is done using OAuth. In ExpressJS we use JWT to authenticate the user. Build a REST API using ExpressJS for user authentication using JWT. # Tasks Create an Express server to service requests from clients.​ Follow the structure of the Node.js application as shown in Demos.​ Create controller, service, DAO and route layers for the users.​ Create controller, service, route layers for authentication.​ Modularize the routing process by declaring all the routes in the index.js file for users and authentication. ​ The authentication middleware must contain code to verify the token, so the user is authenticated to log in to the application.​ ​ Create an error middleware.​ Copy the token generated and send it in the header of the request in Postman after login to the application.​ Test the output in the REST Client Postman. # Instructions 1.Download and unzip the boilerplate code. 2.Run the command npm install to install the dependencies. 3.Open the boilerplate code in VSCode to develop the assignment solution. 4.Write the logic in **.js** file present in **src** folder 5.Run the test scripts available under src/test by giving the npm run test command in the terminal to test locally. 6.Refactor the solution to ensure all test cases are passing. 7.Test all REST end points on **POSTMAN** 8.Zip the solution code with the name same as the assignment name. 9.Upload the zipped solution for submission. # authenticate-user

About


Languages

Language:JavaScript 100.0%