Spring Boot application that uses WebClient and Spring Security's Oauth 2 support to access to a secured REST API. The REST API is secured using KeyCloak
Run this Spring Application
This project is best tested by running the below command
mvn clean package
This should build the project and run the testcase which uses a webclient to make a secured call to a mock api. The test case starts up two servers:
- A mock Oauth2 service for creating tokens
- A mock http server that acts as our api server
The testcase creates a webclient which:
- Invokes the mock Oauth2 server and retrieve a token
- Invokes the mock api server with the token and executes an REST operation on the api