How to do it...

The next steps will present you with creating client applications that use the Implicit grant type to retrieve an access token and to interact with the user's profile endpoint:

  1. Create the project using Spring Initializr. Go to and fill out the form using the following data:
    • Set up the Group as com.packt.example
    • Define the Artifact as client-implicit
    • Add Web, Security, Thymeleaf, JPA, and MySQL as dependencies for this project (you can choose each of these dependencies through the Spring Initializr's main page)
  2. After creating the client-implicit project, import it to your IDE.
  3. Open the pom.xml file and add the following dependency, as we will use the Spring Security OAuth2 project:
<dependency> ...

Get OAuth 2.0 Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.