Perform the following steps to create an OAuth 2.0 Provider that allows for client registration:
- 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 oauth2provider
- Add Web, JPA, MySQL, Security, and Thymeleaf as dependencies for this project
- After creating the oauth2provider project, import it to your IDE. If using Eclipse, import it as a Maven project.
- Open the pom.xml file and add the following dependencies:
<dependency> <groupId>org.springframework.security.oauth</groupId> <artifactId>spring-security-oauth2</artifactId> <version>2.2.0.RELEASE</version>