Migrating custom provider to Quarkus - Implementation of Jakarta REST - ClientBuilder #29518
niklassc7
started this conversation in
Keycloak.X - Quarkus distribution
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to migrate a custom Keycloak authenticator from pre-Quarkus to Keycloak Quarkus.
The old authenticator used JAVA EE (and its Java API for RESTful Web Services) which I replaced with Jakarta EE (and its Jakarta RESTful Web Services / JAX-RS) by replacing all
javax*
imports withjakarta*
and adapting changed methods.This has worked mostly fine, but in a method for getting an access token from Keycloak, the authenticator has this line:
When executed in Keycloak, this throws a
If I'm correct, this happens because Jakarta RESTful Web Services is simply a specification and I need a concrete implementation of the
ClientBuilder
.In my research I found that there are several implementations, like Jersey or JBoss RESTeasy (Wich Quarkus calls RestEasy Classic), and Quarkus REST (formerly RESTEasy Reactive).
On the Quarkus website it states that the default implementation for Quarkus used to be
RestEasy Classic
(JBoss RESTEasy) but since version2.8
it isQuarkus REST
which used to be calledRESTEasy Reactive
.Since Keycloak
24.0.4
uses Quarkus3.8.4
, I assume I should useQuarkus REST
orRESTEasy Reactive
.In the maven repositories I noticed that all the
io.quarkus:quarkus-resteasy-reactive*
packages were moved toio.quarkus:quarkus-rest*
but the oldest version is3.9.*
in the latter. When I want to use the same version of the Quarkus libraries that Keycloak currently ships with (3.8.4
), I assume I need to useRESTEasy Reactive
and notQuarkus REST
.Here, I however fail to find the appropriate package (e.g. in the maven repository) that provides the implementation for ClientBuilder.
Is my reasoning correct that I should use
RESTEasy Reactive
version3.8.4
because the Quarkus version that Keycloak uses, recommends this or is this not relevant for custom providers? Can someone point me to the package and/or javadoc documentation that implementsClientBuilder
in the appropriate Jakarta REST implementation?Beta Was this translation helpful? Give feedback.
All reactions