Simple demo using:
- JSON Web Token (JWT)
- Spring Security
- Spring Boot
- Maven 3
- Java 1.8
run Spring Boot maven plugin:
mvn spring-boot:run
Go to:
- Admin - admin:admin
- User - user:password
- Disabled - disabled:password
https://en.wikipedia.org/wiki/Bcrypt is using to encode passwords.
- http://localhost:8080/h2-console/
- This demo project use H2 db. If you want to change it, change the values of application.yml.
- For other databases like MySQL sequences don't work for ID generation. So you have to change the GenerationType in the entity beans to 'AUTO' or 'IDENTITY'.
I use this library:
https://github.com/auth0/jwt-decode
jwt-decode is a small browser library that helps to decode JWTs token which are Base64Url encoded.