Skip to content

Latest commit

 

History

History
52 lines (48 loc) · 1.66 KB

README.md

File metadata and controls

52 lines (48 loc) · 1.66 KB

User Registration and Authentication API

Java Spring Boot Spring Security Spring Data JPA JWT OpenSSL H2 Database

Installation

Build the docker image

docker build -t spring-security-basics .

Running the container

docker run -p 8080:8080 spring-security-basics

Endpoints

Register user

POST localhost:8080/auth/register
  • URL: localhost:8080/auth/register
  • Method: POST
  • Response: 201 Created

Body:

   {
     "firstName": "John",
     "lastName": "Doe",
     "email": "[email protected]",
     "password": "password123"
   }

Login

POST localhost:8080/auth/login
  • URL: localhost:8080/auth/login
  • Method: POST
  • Response: 202 Accepted - JWT

Body:

   {
     "email": "[email protected]",
     "password": "password123"
   }