Auth

Endpoints for authentication

Register

post

Enter credentials to get JWT token.

Body

Request for user authentication

usernamestringRequired

Username of the user

Example: john_doe
passwordstringRequired

Password of the user

Example: password123
namestringRequired

Name of the user

Example: Joe Don
Responses
200
OK
*/*
post
POST /api/auth/register HTTP/1.1
Host: localhost:8080
Content-Type: application/json
Accept: */*
Content-Length: 65

{
  "username": "john_doe",
  "password": "password123",
  "name": "Joe Don"
}
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Login

post

Enter credentials to get JWT token.

Body

Request for user authentication

usernamestringRequired

Username of the user

Example: john_doe
passwordstringRequired

Password of the user

Example: password123
Responses
200
OK
*/*
post
POST /api/auth/login HTTP/1.1
Host: localhost:8080
Content-Type: application/json
Accept: */*
Content-Length: 48

{
  "username": "john_doe",
  "password": "password123"
}
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Was this helpful?