[keycloak-user] user storage provider (Keycloak 2.5.0) deployed as war file: CDI does not work

Stian Thorgersen sthorger at redhat.com
Tue Jan 24 02:50:15 EST 2017


I'm pretty sure CDI just won't work. When we invoke the provider from
Keycloak it doesn't setup the CDI context as it's not a managed request to
the deployment so the necessary CDI filters and such are not invoked.

On 19 January 2017 at 16:01, Bill Burke <bburke at redhat.com> wrote:

> How exactly are you implementing it?  Can you point me to some example
> code?  Remember, UserStorageProviderFactory *MUST* be a POJO.  I haven't
> done CDI in years, but I believe it would work similarly to the EJB
> example, except you'd look up the CDI bean manager and allocate your
> provider through the bean manager.
>
>
> On 1/19/17 5:36 AM, Matuszak, Eduard wrote:
> > Hello
> >
> > It is not possible for me, to bring CDI (@Inject) to work in a user
> storage provider application (Keycloak 2.5.0), deployed as a war-file. The
> required beans.xml is placed correctly in the war-file and passed by Weld
> during deployment, but all injected objects are null.
> >
> > Is this a known (and possibly perforced) behaviour,  a (minor) bug or
> simply due to a missing trick?
> >
> > Thanks in advance for a feedback, Eduard Matuszak
> >
> >
> > _______________________________________________
> > keycloak-user mailing list
> > keycloak-user at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/keycloak-user
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>


More information about the keycloak-user mailing list