Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 1.54 KB

README.md

File metadata and controls

35 lines (27 loc) · 1.54 KB

LAB 11 - Auth Server

Express server that implements Basic Authentication, with signup and signin capabilities, using a Mongo database for storage.

Project Details

Author: Yahya Abu Khalil Links and Resources submission PR Github actions

Modules and Middlewares

  • server.js server module as a centralized base of operations.
  • 404.js error page not found middleware.
  • 500.js error input/logic middleware.

-[./auth/middleware/basic] verifies login information with username and password. -[./auth/middleware/oauth] verifies login information through username and github OAuth. -[./auth/middleware/bearer] verifies user session information for each required route. -[./auth/middleware/basic] verifies user action permission for each required route.

Database and Routes

Setup

Clone the repo, and run the following commands to install the required dependencies and dev dependencies.

  • npm install to download all that exists in package.json.
  • npm install mongoose to run the database properly, and start it beforehand.

Running the app

  • npm start to test the server yourself using postman.
  • npm test to run the thorough testing functions.

Unit testing with: npm test using supertest to test each route.

Unified Modeling Language (UML)

UML image