Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication authorization #4

Open
wants to merge 118 commits into
base: master
Choose a base branch
from
Open

Conversation

Ihar-dev
Copy link
Owner

@Ihar-dev Ihar-dev commented Aug 4, 2022

  1. Task: https://github.com/AlreadyBored/nodejs-assignments/blob/main/assignments/authentication/assignment.md

  2. Screenshots: screenshot 937

  3. Done: 07.08.2022 / deadline 07.08.2022

  4. Score: 170/170
    Basic Scope
    +30 Route /auth/signup implemented correctly, related logic is divided between controller and corresponding service
    +30 Route /auth/login has been implemented, related logic is divided between controller and corresponding service
    +10 User password saved into database as hash
    +20 Access Token is implemented,JWT payload contains userId and login, secret key is saved in .env.
    +40 Authentication is required for the access to all routes except /auth/signup, /auth/login, /doc and /.
    +10 Separate module is implemented within application scope to check that all requests to all routes except mentioned above contain required JWT token
    Advanced Scope
    +30 Route /auth/refresh implemented correctly, related logic is divided between controller and corresponding service

  5. Logging & Error Handling PR: Logging error handling #5

  6. Logging & Error Handling score: 170/170

Total: 340/340

Installation:

Use your terminal command line interface

$ git clone https://github.com/Ihar-dev/nodejs2022Q2-service.git
or
$ git clone git@github.com:Ihar-dev/nodejs2022Q2-service.git

then
$ cd nodejs2022Q2-service
$ git checkout authentication-authorization
$ npm i

also you need docker to be installed and started
https://www.docker.com/get-started/

How to Use The Application:

$ docker compose up postgres -d
$ npm run start:dev

Testing:

in an additional terminal after the application starting
$ cd nodejs2022Q2-service
$ npm run test:auth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants