To run the backend, cd into the directory and execute the following command
./gradlew bootRunSend POST with body containing the following JSON in the body to localhost:8080/auth/signup
{
"username": "user123",
"password": "pwd"
}Response received with code 200 on successful signup will be
{
"message": "User registered!"
}Send POST with body containing the following JSON in the body to localhost:8080/auth/signin
{
"username": "user123",
"password": "pwd"
}Response received with code 200 on successful login will be (contains other not important information too)
{
"token": "ddffgggddghghggws...",
"type": "Bearer"
}The important thing to note is the token and type of token this will be used to authorize the user.
To use this token, add it to the html request header in the authorization field. For more information on Authorization field, refer to the following link: