Integration testing with keycloak

Keycloak is my identity provider, and I have an endpoint that is secured by Keycloak. I want to write an integration test to test that endpoint, but obviously, my identity provider blocks any connection that is not authenticated. How can I do that? In the future, there will also be roles, so simply bypassing authentication for the test won’t be an option because I also need to test the functionality with roles.

Leave a Comment