[keycloak-user] keycloak-client-admin java examples & docs

Wyllys Ingersoll wyllys.ingersoll at keepertech.com
Wed Oct 31 11:24:28 EDT 2018


Im trying to write a keystone client for a 3rd party java service that will
authenticate to Keycloak using the org.keycloak.admin.client.Keycloak
interfaces.   There are a couple of snippets of code examples online, such
as here:
https://www.keycloak.org/docs/4.5/server_development/#example-using-java
and others such as
https://gist.github.com/thomasdarimont/43689aefb37540624e35 but none of
them actually work (at least not for me) I always get the following
exception when working with the 4.5.0.Final packages:

java.lang.IllegalArgumentException: interface
org.keycloak.admin.client.token.TokenService is not visible from class
loader

I've seen this same exception mentioned in several threads, but have not
seen a working solution/workaround or even a good explanation of why the
error is occurring.

The javadocs at https://www.keycloak.org/docs-api/4.5/javadocs/  do not
include the docs for the admin.client.Keycloak classes.

Can anyone point me to a *working* example of using the Keycloak
admin-client java API or some online java docs for those classes?

thanks,
  Wyllys Ingersoll


More information about the keycloak-user mailing list