Let's build it!
We have all the theory now. We know how to make the authorization request and the subsequent access token request, and we know the two types of responses we can get (success or error) for each one. Let's build it in our sample application!
Build the base application
To demonstrate the authorization code grant flow, we will be building a basic Java application. It will contain a simple HTML/JS frontend powered by a Java backend, which we will use to make our requests and process the responses. As we did in the previous chapter, we will also be using Apache Maven to facilitate the creation and running of this sample application. Many of these beginning steps for setting up the application are very similar to the steps we followed in the previous chapter. Some are even identical. After we have built the base application, though, the steps become quite different.
Install Apache Maven
If you haven't already installed Apache Maven for the sample application in the previous chapter...