How to do it...

Perform the following steps to set up a database as the store for the client details and tokens repository:

  1. Create the initial project using Spring Initializr as we did for other recipes in this book. Go to https://start.spring.io/ and define the following data:
    • Set up the Group as com.packt.example
    • Define the Artifact as rdbm-server
    • Add Web, JPA, MySQL and Security as dependencies for this project
  2. After creating the rdbm-server project, import it to your IDE. If using Eclipse, import it as a Maven project.
  1. Open the pom.xml file and add the following dependencies:
<dependency>  <groupId>org.springframework.security.oauth</groupId>  <artifactId>spring-security-oauth2</artifactId></dependency>
  1. Open the application.properties ...

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.