A Spring Boot backend application that utilizes JWT (JSON Web Tokens) for authentication and authorization.
This project provides a robust backend setup with JWT authentication. Users can register, authenticate, and make API calls secured with JWT. All of the users are saved on a local postgresql server.
Authorization: bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJrcmluc0BlbWFpbC5jb20iLCJpYXQiOjE2OTI4OTY5OTMsImV4cCI6MTY5MzUwMTc5M30.Vuqr89siFnWeB3p4AO-epUtpODZ-PcCLjwlcqNOJ4Nw
To create a new account: Send a POST request to localhost:8080/api/v1/register with these in the body, and that will create an account and response with a token
{
"firstname": "krins",
"lastname": "krins",
"email": "[email protected]",
"password": "password"
}
if you are already registered and you need a new token, you can make a POST request to localhost:8080/api/v1/authenticate with email and password in the body, and that should return with a new JWT token.
{
"sub": "[email protected]",
"iat": 1692896993,
"exp": 1693501793
}