How to do it...

As this recipe relies on the existing source code, you can create a new project at Spring Initializr using Web, JPA, H2, Thymeleaf, and Security as dependencies (do not forget to set up the Artifact and Group names) and copy all the source code from the google-connect project. Rather than creating a new project, you can use the google-connect project directly, so we can add UserInfo features, which are described in the following steps (for this recipe, the project name was defined as google-userinfo):

  1. Open the application.properties and make sure it has the same properties that were defined for the google-connect project.
  2. Then, make sure all the classes and templates are the same as google-connect.
  3. As a user info attribute, ...

Get OAuth 2.0 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.