I am writing a custom endpoint and I want to use the the AuthzClient
My jar is built in maven and I have
As a dependeny
I even added it to the shaded jar plugin as well as an includes
However at runtime I keep getting
14:31:23,018 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-2) Uncaught server error: java.lang.NoClassDefFoundError: org/keycloak/authorization/client/AuthzClient
Please can I get some help to resolve this as I am now stuck
Are you running the Quarkus (17) version or the legacy Wildfly version? With Wildfly, I had to add the authz client as a module, and then make my extension depend on that module.
How do you add it as a module?
Did you fix it? I have a similar issue when creating the AuthzClient object. The dependency you wrote (version 17.0.0, same as my Keycloak) in Maven as well as the JAR of it in the class path.
I run the Keycloak Quarkus version
Quarkus version cause me a similar problem with the same error displayed
I got it to work and I added the following into my pom.xml file
I then also had
It then worked for me
I tried this but I got the same error