Our tests need to connect to a OpenID Connect provider to bootstrap the application context.
We’ve previously ran WireMock in proxy mode to record the calls made to our Keycloak OpenID Connect provider:
java -jar wiremock-jre8-standalone-2.33.2.jar --record-mappings --proxy-all="http://localhost:8090"
The resulting mappings
and __files
can be found in this folder.
To serve the recorded mappings with WireMock we can run the same jar:
java -jar wiremock-jre8-standalone-2.33.2.jar --port 8090
To verify the required endpoint is available, open up: http://localhost:8090/auth/realms/spring-cloud-gateway-realm/.well-known/openid-configuration