[keycloak-user] Java admin clients

christian lutz christianlutz at inovel.de
Mon Sep 4 06:34:57 EDT 2017


Hello James,

please see this pom file. https://github.com/ChristianLutz/keycloak-cxf-admin-client/blob/master/pom.xml 
We created our own cxf-admin-client because we rely on cxf. 

So just ignore our cxf dependencies and replace them with the resteasy dependency. And you should be fine for compiling.
And these are the runtime dependency. Maybe one or another isn't necessary anymore.

	<feature name="keycloak-adapter" version="${keycloak.version}">
		<details>The keycloak adapter core stuff</details>
		<feature version="[3,5)">http-whiteboard</feature>
		<bundle>mvn:org.bouncycastle/bcprov-jdk15on/1.52</bundle>
		<bundle>mvn:org.bouncycastle/bcpkix-jdk15on/1.52</bundle>
		<bundle>mvn:com.fasterxml.jackson.core/jackson-core/${jackson-version}</bundle>
		<bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson-version}</bundle>
		<bundle>mvn:com.fasterxml.jackson.core/jackson-databind/${jackson-version}</bundle>
		<bundle>mvn:com.fasterxml.jackson.module/jackson-module-jaxb-annotations/${jackson-version}</bundle>
		<bundle>mvn:org.jboss.logging/jboss-logging/3.3.0.Final</bundle>
		<bundle>mvn:org.keycloak/keycloak-osgi-thirdparty/${keycloak.version}</bundle>
		<bundle>mvn:org.keycloak/keycloak-common/${keycloak.version}</bundle>
		<bundle>mvn:org.keycloak/keycloak-core/${keycloak.version}</bundle>
		<bundle>mvn:org.keycloak/keycloak-cxf-admin-client/${keycloak.version}</bundle> //replace it with your default resteasy dependency.
		<bundle>mvn:org.keycloak/keycloak-authz-client/${keycloak.version}</bundle>
		<bundle>mvn:org.keycloak/keycloak-adapter-spi/${keycloak.version}</bundle>
		<bundle>mvn:org.keycloak/keycloak-adapter-core/${keycloak.version}</bundle>
		<bundle>mvn:org.keycloak/keycloak-osgi-adapter/${keycloak.version}</bundle>
	</feature>

Hope this may help a bit.
Kind regards.
Christian





-------- Original Message --------
Subject: [keycloak-user] Java admin clients (4. September 2017, 12:13)
From:    James Green <james.mk.green at gmail.com>
To:      christianlutz at inovel.de

> In the absence of a Swagger endpoint (which would be so useful!) I've been
> trying to use the admin-client in my client, but I cannot get even this to
> work.
> 
> It seems it requires an older version of Resteasy, which I downgrade to,
> then find I need to upgrade Jackson, then discover there are binary API
> changes preventing it's use presumably with keycloak-3.
> 
> So I switched to OpenFeign and hooked in the JAXRS contracts feature, but
> this blows up because various methods of the various interfaces lack HTTP
> methods see UsersResource#get()
> 
> So all-in-all, I'm not having any luck with something that looks like an
> off-the-shelf dependency to just "use" :(
> 
> I've followed through a number of the example gists on Github but they all
> seem to pre-date Keycloak-3 and don't work.
> 
> The keycloak-admin-client doesn't seem to have any tests to confirm it
> actually works, either. So does anyone have a way forward without me having
> to re-implement the interfaces?
> 
> What I'd *really* like to see is a Swagger endpoint that I can point
> swagger-codegen at as we've had success though this means with other
> software in the past, but I can't find anything other than requests for
> Swagger in past emails to this list.
> 
> Yours rather frustrated,
> 
> James
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user


To: james.mk.green at gmail.com
    keycloak-user at lists.jboss.org




More information about the keycloak-user mailing list