Skip to content
Snippets Groups Projects

Resolve "Authentication JWT"

Merged Priyadarshini Saha requested to merge 79-authentication-jwt into main

Description

Added JWT authentication for users with HTTP cookies

Issue

Issue 79

Feature

API Endpoints: 1. Login

  • Endpoint: http://localhost:8000/user-auth/login [POST]
  • Request Body:
{
    "email": "samika@gmail.com",
    "password": "samika"
}
  • Response: User + HTTP Cookie

2. Registration

  • Endpoint: http://localhost:8000/user-auth/register [POST]
  • Request Body:
{
    "username": "priya",
    "email": "priya@gmail.com",
    "password": "priyadarshini",
    "firstname": "priya",
    "lastname": "saha",
    "occupation": "student"
}
  • Response Body: User
  1. User
  • Endpoint: http://localhost:8000/user-auth/user [GET]
  • Response Body: User
  1. Logout
  • Endpoint: http://localhost:8000/user-auth/logout [POST]
  • Request Body: None
  • Response Body: None

Tophatting

New postman collection pinned to discord

Expected current behavior

What should you see or expect when you test this feature?

Changes

Added JWT authentication

Screenshots

Add any screenshots required

Design Patterns

REST API

Deviations

Were there any deviations from the original design or architecture plan. If yes, what were they ?

Additional

  • Unit test written
  • Meets requirements
  • Cross-browser tested
  • Added/updated documentation as needed
  • Camel case style used

Closes #79 (closed)

Merge request reports

Approval is optional

Merged by Priyadarshini SahaPriyadarshini Saha 2 years ago (Nov 29, 2022 8:26pm UTC)

Merge details

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading