[keycloak-dev] Add your custom Spi to the Keycloak session?

Erik Mulder erik.mulder at docdatapayments.com
Mon Nov 23 16:13:36 EST 2015


I'll be happy to create a PR for this if you can provide me some info & tips on how to get this working.
 
________________________________________
Van: Stian Thorgersen [sthorger at redhat.com]
Verzonden: maandag 23 november 2015 20:04
Aan: Erik Mulder
CC: keycloak-dev
Onderwerp: Re: [keycloak-dev] Add your custom Spi to the Keycloak session?

No specific reason it can't. Feel free to create a JIRA to request.

It's not something we can prioritize right now though. If you're willing to do a PR I can give you some pointers on how to implement it.

On 23 November 2015 at 16:54, Erik Mulder <erik.mulder at docdatapayments.com<mailto:erik.mulder at docdatapayments.com>> wrote:
We are extending KeyCloak with some custom functionality and we like to
add an extra org.keycloak.provider.Spi and 'piggy-back' on the
KeycloakSession.getProvider mechanism at various places. So we added a
org.keycloak.provider.Spi file in the META-INF/services of our provider
jar with the Spi implementation we made. But unfortunately, it's not
picked up by the DefaultKeycloakSessionFactory, since the classloader
that is used in ServiceLoader.load (DefaultKeycloakSessionFactory:56)
doesn't have the custom provider jars in scope. Is this intentional?

I can understand if you don't want some external Spi 'entering' the
KeyCloak system. On the other hand, that's the 'own risk' of the
developer creating it. We would like this constraint lifted if possible.
If not, is there another way we can get our own Spi's added to the
keycloak session without changing any KeyCloak sources? Like using a
module instead of a 'plain' provider jar? Are these added modules in
scope of the DefaultKeycloakSessionFactory classloader?


_______________________________________________
keycloak-dev mailing list
keycloak-dev at lists.jboss.org<mailto:keycloak-dev at lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/keycloak-dev




More information about the keycloak-dev mailing list