Running the project

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:

Figure 12: Spring Dashboard in IntelliJ

Navigate to http://localhost:8080 and you will be redirected to the unsecured page of the client application, as shown here:

Figure 13: Unsecured page of client app

Click on the link, and you will be taken to the custom login page, as shown here:

Figure 14: Custom login page of client app

Enter the username/password as required on the page; then, clicking on Log In will take you to the secured page, as shown here:

Figure 15: Secured page in client app

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:

Figure 16: Authorization server login page

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:

Figure 17: Authorization page on authorization server

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:

Figure 18: Movie listing page in the client app displaying a movie API exposed on resource server

With this, we have completed our sample application, in which we have implemented all the roles that are part of OAuth.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.218.62