In the previous recipe, you can understand all the pieces required for enabling proof-of-possession key semantics at the OAuth Provider side. This recipe will help you to create an application that is able to interact with the OAuth Provider, being capable to prove that it has possession of a private key related to the public key embedded within the JWS token that can be presented to the Resource Server when interacting with protected resources.
This recipe presents you with how to implement the client side of a proof-of-possession key stack, which is implemented as a Spring Boot application using Java 8, Maven, Spring Web, Spring Security, and Nimbus JOSE + JWT (which provides JWE and encryption capabilities). The other dependencies will be described in the How to do it... section.