Ah, using the KeycloakSession within the custom listener is much easier.
Thanks!
On Mon, Mar 13, 2017 at 4:38 PM, Marko Strukelj <mstrukel(a)redhat.com> wrote:
There should be a better way to access admin services within the
same
container than by trying to do HTTP calls to Admin REST API.
Inside your custom listener you have access to a KeycloakSession, and
through it to all the system components you may wish for - you should
definitely use these rather than the roundabout way via DNS + HTTP +
Authentication + REST serialization / deserialization.
On Mon, Mar 13, 2017 at 8:43 PM, Danny Im <imxxx021(a)umn.edu> wrote:
> Hi,
>
> I'm trying to use the admin client (version 2.5.1) from within a custom
> Event Listener Provider, and when I try creating an instance of the admin
> client (via a call to the getInstance method of the
> org.keycloak.admin.client.Keycloak class), I get the following error:
>
> ERROR [io.undertow.request] (default task-14) UT005023: Exception handling
> request to /auth/admin/realms/master/events/config:
> org.jboss.resteasy.spi.UnhandledException:
> java.lang.IllegalArgumentException: interface
> org.keycloak.admin.client.token.TokenService is not visible from class
> loader
>
> Attached is the stack trace.
>
> Any idea why this is happening?
>
> Thanks!
>
>
> --
> Danny Im
> Software Developer
> Polar Geospatial Center
> University of Minnesota
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/keycloak-user
>
--
Danny Im
Software Developer
Polar Geospatial Center
University of Minnesota