-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable contract testing on OIDC protected resources on Quarkus testing tools #94
Comments
Welcome to the Microcks community! 💖 Thanks and congrats 🎉 for opening your first issue here! Be sure to follow the issue template or please update it accordingly. 📢 If you're using Microcks in your organization, please add your company name to this list. 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact. If you need to know why and how to add yourself to the list, please read the blog post "Join the Microcks Adopters list and Empower the vibrant open source Community 🙌" Hope you have a great time there! 🌟 ~~~~~~~~~ 🌟 📢 If you like Microcks, please ⭐ star ⭐ our repo to support it! 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact. |
Signed-off-by: Laurent Broudoux <[email protected]>
Signed-off-by: Laurent Broudoux <[email protected]>
Signed-off-by: Laurent Broudoux <[email protected]>
You can now use constructs as: // Issue a TestRequest with OAuth2 context.
TestRequest testRequest = new TestRequest.Builder()
.serviceId("API Pastries:0.0.1")
.runnerType(TestRunnerType.OPEN_API_SCHEMA.name())
.testEndpoint("http://good-impl:3002")
.timeout(2000L)
.oAuth2Context(new OAuth2ClientContext.Builder()
.clientId("myrealm-serviceaccount")
.clientSecret("ab54d329-e435-41ae-a900-ec6b3fe15c54")
.tokenUri("http://keycloak:8080/realms/myrealm/protocol/openid-connect/token")
.grantType(OAuth2GrantType.CLIENT_CREDENTIALS)
.build())
.build(); |
Now done! |
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:
The text was updated successfully, but these errors were encountered: