Implementing OAuth 2 authentication for our service

OAuth 2 for Spring Security (spring-security-oauth2) is the module to provide OAuth 2 support to Spring Security. We will add it as a dependency in our pom.xml file:

    <dependency>      <groupId>org.springframework.security.oauth</groupId>      <artifactId>spring-security-oauth2</artifactId>    </dependency>

Get Mastering Spring 5.0 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.