Closed
Description
Reason/Context
The context of the feature request has been discussed here:
https://github.com/orgs/microcks/discussions/1379
Description
Support of creation of valid bearer tokens against the OIDC Quarkus devservice tools (keycloak) to be able to contract test API which are authenticated.
Implementation ideas
The keycloak related information (url/port/client/secret/username/password) could be provided by the test implementer in the TestRequest builder. Something similar to this below:
TestRequest testRequest = new TestRequest.Builder()
.serviceId("My API:1.0.0-SNAPSHOT")
.runnerType(TestRunnerType.OPEN_API_SCHEMA.name())
.testEndpoint("http://host.testcontainers.internal:" + quarkusHttpPort)
.withKeycloakUrl("http://host.testcontainers.internal:" + keycloakPort).withClient("myOidcClient").with....
.build();