So far, I made some changes to your code:
In application.properties, use this property instead of create-drop to recreate the table every time I start the application:
I use port 8080 instead of 6666
I use Postman to do the following:
1. I first send a POST request at localhost:8080/auth/register.
I submit these info in JSON
{
"firstname" : "John",
"lastname": "Smith",
"username" : "jsmith3",
"password": "smith3",
"email" : "jsmith3@gmail.com"
}
2. I then send a POST request at localhost:8080/auth/login
{ "username" : "jsmith3",
"password": "smith3"
}
I got the access token
3. I create another GET request at localhost:8080/endpoints/user
Under the Authorization panel, copy and paste the token in the Bearer Token field.
4. So far, I get access to the endpoint