This recipe will show you how to create a Resource Server that is able to validate JWE access tokens. By using this recipe you will also be able to understand important extension points provided by Spring Security OAuth2 and how to integrate other libraries such as Nimbus to allow cryptography.
To run this recipe, you will need to create a Spring Boot application to configure the Resource Server using Java 8, Maven, Spring Web, Spring Security, and Nimbus JOSE + JWT. Some dependencies will be described in the How to do it... section.
This recipe presents you with how you can create the Resource Server that will be defined as the project jwe-resource
. This project is available on GitHub in the Chapter05
folder and all you need to create this project is presented in the following steps:
- You can create the project
jwe-resource
at Spring Initializr, referencingWeb
andSecurity
dependencies to easily set up the project. - If you have created...