This is a bare-bones Spring Boot 2 Oauth2 resource server with an authorization server.
Here's a way to run it with a docker mysql server (highly recommended for developing/testing).
If you wish to run it against your native mysql environment, then just change the application.properties
file or define your own profile application-[your-profile].properties
.
- Install docker
- Run the docker container in the root of the project
docker-compose up
- Create a new terminal tab and cd into
bash_scripts
folder, run./create-tables-add-data.sh
(This will setup all the oauth DB tables) - Install dependencies
mvn clean install
- Run it
mvn spring-boot:run
Server should now be up and running on http://localhost:8080
.
- Install Postman
- Import Postman collection from the
project.postman_collection.json
file - Run the
/oauth/token
POST request and get a access_token. - Change the token value to the access_token in the other requests and you should get 200 OK responses.
Mysql 5.7