How to do it...

This recipe creates the microsoft-login project, which is available on GitHub in the Chapter06 folder. Import the generated project as a Maven project into your IDE and follow these steps:

  1. Open the pom.xml file and add the following extra dependencies:
<dependency><groupId>org.springframework.security</groupId><artifactId>spring-security-config</artifactId></dependency><dependency><groupId>org.springframework.security</groupId><artifactId>spring-security-oauth2-client</artifactId></dependency>
  1. Create two sub-packages within the generated package, namely security and user.
  2. Within the security sub-package, create the following class with getters and setters for each declared attribute. This class holds Google properties for ...

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.