This recipe provides you with a storage strategy that is more production-like instead of using an in-memory registry. The strategy presented in this recipe helps you how to use a Relational Database Management System (RDBMS) to store all client details and data related to tokens.
To run this recipe, you need the MySQL database besides the other tools, such as your preferred IDE and tools that allows to interact with the OAuth 2.0 Provider. The source code for this recipe is available on GitHub at https://github.com/PacktPublishing/OAuth-2.0-Cookbook/tree/master/Chapter02/rdbm-server.
Perform the following steps to set up a database as the store for the client details and tokens repository:
- 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
ascom.packt.example
- Define the
Artifact
as...
- Set up the