[keycloak-user] How to include the keycloak wildfly adapter libraries in the secure war application classpath?

Darrell Wu darrell at 1placeonline.com
Fri May 20 07:27:16 EDT 2016


If it helps I'm using wildfly 10 and have keycloak on a standalone server.
The authenication works. It just when my app tries to read the security
context I get the class not found exception.

So what triggers wildfly to include the keycloak modules in my apps class
path?
On 20/05/2016 10:10 pm, "Bruno Oliveira" <bruno at abstractj.org> wrote:

> Weird because it was fixed here:
> https://issues.jboss.org/browse/KEYCLOAK-2483. Plus, I tested
> on WildFly 9.0.2.Final with Keycloak adapter 1.9.4.Final and couldn't
> reproduce the issue.
>
> On 2016-05-20, Darrell Wu wrote:
> > Hi,
> >
> > With the keycloak wildfly adapter for version 1.9.x i've noticed that the
> > location of the Keycloak Subsystem modules have changed from
> > modules\system\layers\base\org\keycloak to
> > modules\system\add-ons\keycloak\org\keycloak
> >
> > Now on my secure war application server I've installed the keycloak
> wildfly
> > adpater by unzipping the archive and running the adapter-install.cl
> script.
> >
> > Now In my application i'm getting a
> > ClassNotFoundException: org.keycloak.KeycloakSecurityContext
> >
> > when the following is executed
> >
> > KeycloakSecurityContext securityContext = (KeycloakSecurityContext)
> > httpRequest.getAttribute(KeycloakSecurityContext.class.getName());
> >
> > Obviously the application isn't loading the keycloak modules in the
> > classpath.
> > What is the proper way to include the keycloak libraries in my app?
> >
> > Should my app have a jboss-deployment-structure.xml file   or should the
> > libraries be moved back to modules\system\layers\base\org\keycloak?
> >
> > Thanks
> >
> >
> >
> > --
> > Darrell Wu
> > 1Place Limited
> > P.O. Box 125152, St Heliers, Auckland 1740, New Zealand
> > Level 4, 1 Queen Street, Auckland 1010, New Zealand
> > Phone: +64 9 5200612 ext 521 | Mob: +64 21 262 4898 | Fax: +64 9 5246203
> > Email: darrell at 1placeonline.com | Web: www.1placeonline.com
>
> > _______________________________________________
> > keycloak-user mailing list
> > keycloak-user at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/keycloak-user
>
>
> --
>
> abstractj
> PGP: 0x84DC9914
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160520/24dfd69e/attachment.html 


More information about the keycloak-user mailing list