08-18-2022 10:59 AM
Hello,
I finally succeeded to use Keycloak as a identity provider for my Nuxeo using the openid package. I can now connect using JWT Token generated by Keycloak and get all my user infos even groups ! Now I am trying to use Nuxeo Java Client to do the same thing. Here is my code :
NuxeoClient nuxeoClient = new NuxeoClient .Builder() .url(url) .connectTimeout(connectTimeout) .readTimeout(readTimeout) .interceptor(new JWTAuthInterceptor(token)) .authentication(new JWTAuthInterceptor(token)) .schemas("*") .connect();
But I am always getting errors (401 not authorized).
Did I forget something ?
I am using Nuxeo LTS 2021 / Nuxeo Java Client 3.11.0 / Keycloak 19.0.1 / JDK 11.
Regards.
08-19-2022 05:19 AM
Hello [Kevin Leturc](https
08-19-2022 10:17 AM
Hello,
I'm not sure the JWTAuthInterceptor
is working with the Keycloak provider. The interceptor works with the JWT secret configured on Nuxeo side, see https://doc.nuxeo.com/client-java/3.11/authentication/#jwt-authentication
Maybe you need to create your own interceptor for this use case, how do you succeed to authenticate with a Keycloak token, do you have a curl command example?
Thanks
08-25-2022 05:13 AM
Thank you [Kevin Leturc](https
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.