Example of authentication and authorization using JSON Web Tokens (JWT) in Spring Boot, and integration tests with Spock.
Authorization Service
- Validates credentials and generates JWT tokens containing roles.
- See: AuthController, AuthControllerIntegrationSpec
Resource Service
- Authenticates based on valid JWT token in request, authorizes based on roles contained within the token.
- See: BookController, BookControllerIntegrationSpec