Admin - admin:admin User - user:password Disabled - disabled:password (this user is deactivated)
/api/authenticate - authentication endpoint with unrestricted access /api/user - returns detail information for an authenticated user (a valid JWT token must be present in the request header) /api/persons - an example endpoint that is restricted to authorized users with the authority 'ROLE_USER' (a valid JWT token must be present in the request header) /api/hiddenmessage - an example endpoint that is restricted to authorized users with the authority 'ROLE_ADMIN' (a valid JWT token must be present in the request header)
spring: jpa: hibernate: # possible values: validate | update | create | create-drop ddl-auto: create-drop datasource: url: jdbc: mysql://localhost/myDatabase username: myUser password: myPassword driver-class-name: com.mysql.jdbc.Driver
-
spring-security-pac4j a Spring Boot integration for Pac4j (a Java security engine that covers JWT beside others) -
For more complex microservice environments take a look here: Using JWT with Spring Security OAuth