Start all the projects individually using the Spring Boot mvn spring-boot:run command. I am using Spring Dashboard in IntelliJ, where I can launch all the projects, as shown in the following screenshot:
Navigate to http://localhost:8080 and you will be redirected to the unsecured page of the client application, as shown here:
Click on the link, and you will be taken to the custom login page, as shown here:
Enter the username/password as required on the page; then, clicking on Log In will take you to the secured page, as shown here:
Click on the movie API link, and you will be taken to the OAuth flow and then to the authorization server default login page to enter credentials, as shown here:
Enter the username/password (we have kept that as user/password) and click on the Login button. You will be taken to the authorization page, as shown in the following screenshot:
Click on Authorize and you will be taken back to the client application page, which displays all the movies from the resource server, as shown here:
With this, we have completed our sample application, in which we have implemented all the roles that are part of OAuth.