Springboot-security-jwt-openapi-mockito
This application implemented using spring boot, spring security, JWT token, open API, Mockito, Junit, JPA, H2 database and lombok.
URL : http://localhost:8181/h2-console
URL : http://localhost:8181/swagger-ui/index.html
URL : http://localhost:8181/swagger-api-docs
To enable debug log level
logging.level.com.rajeshkawali=DEBUG
Sample json for postman and all api's
{
"firstName":"Rajesh",
"surname":"Kawali",
"smoothiePreference":"Strawberry",
"mobileNumber":9988776655
}
POST : http://localhost:8181/api/v1/customer/add
GET : http://localhost:8181/api/v1/customer/getAll
GET : http://localhost:8181/api/v1/customer/1
PUT : http://localhost:8181/api/v1/customer/1
DELETE : http://localhost:8181/api/v1/customer/1
POST : http://localhost:8181/api/v1/auth/register
{
"firstName":"Rajesh",
"lastname":"Kawali",
"email":"rajesh@mail.com",
"password":"mypassword",
"role":"USER or ADMIN"
}
POST : http://localhost:8181/api/v1/auth/authenticate
{
"email":"rajesh@mail.com",
"password":"mypassword"
}
Provide existing token in postman's ->Authentication ->bearer token
POST : http://localhost:8181/api/v1/auth/refresh-token
Provide existing token in postman's ->Authentication ->bearer token
POST : http://localhost:8181/api/v1/auth/logout