[keycloak-user] Custom domain extension for user creation

Dmitry Telegin mitya at cargosoft.ru
Mon Dec 18 21:38:23 EST 2017


Mark,

There exists a simple provider event API in Keycloak, see
o.k.models.KeycloakSessionFactory, o.k.provider.ProviderEvent (and its
subtypes) and o.k.provider.ProviderEventManager.

Unfortunately, at the moment there's no event for user creation, just
for removal. I think you could create a JIRA issue and implement
something like UserCreationEvent (please discuss naming with Keycloak
devs). Obviously, this functionality will be only available upon the
next Keycloak release.

Alternatively, you may implement Infinispan cache event listener (see
org.infinispan.notifications.Listerer annotation).

Cheers,
Dmitry

> Hi,
> 
> I am working on a custom extension to Keycloak using the domain-
> extension
> example as a reference, As part of this extension we need to add to
> the
> create user functionality. We are adding two new tables which are
> linked to
> a UserEntity. We require our custom data to be added in the same
> transaction as creating a new user. Do you have a recommended way of
> achieving this?
> 
> Regards,
> 
> Mark
> _______________________________________________
> 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