Spring boot microservices with spring security and jwt token for role based authorization.
To Run each microservices follow below step for each microservice.
mvn clean install
mvn spring-boot:run
URL : http://localhost:8581/auth
HTTP Method : POSTJson Request (admin) :
{
"username":"admin",
"password":"12345"
}
Json Request (user) :
{
"username":"hk",
"password":"12345"
}Header Response :
{
"Authorization":"Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJoayIsImF1dGhvcml0aWVzIjpbIlJPTEVfVVNFUiJdLCJpYXQiOjE1OTEzMzkyNTgsImV4cCI6MTU5MTQyNTY1OH0.Jt49E0MtEUtLoHD3lc2G44g1ZbPlPc1-dHJ-oYksXiI-Iy6mzDvu4ZYL1n1ryyd09c01lxIkHqyoBpeXIDW7RA"
}
Spring Boot Microservice Security is an open source project. So, feel free to contribute. And if you're new to contributing to Open Source on Github, then this guide will help you.
If you find any error or have any suggestion, feel free to create an issue.