[keycloak-user] How to configure a user Federation SPI implementation
Marek Posolda
mposolda at redhat.com
Mon Aug 1 13:32:39 EDT 2016
In YourUserFederationProviderFactory.init you can read the properties,
which you configured in the keycloak-server.json. It's used in the event
example for instance. For UserFederation it works the same way :
https://github.com/keycloak/keycloak/blob/master/examples/providers/event-store-mem/src/main/java/org/keycloak/examples/providers/events/MemEventStoreProviderFactory.java#L56
Note that YourUserFederationProviderFactory.getId is corresponding to
the providerId used in keycloak-server.json .
Btv. the YourUserFederationProviderFactory.getConfigurationOptions() you
can return list of strings, which will be used as names of the
properties configurable in admin console. This is an alternative to
keycloak-server.json configuration. See the userFederation example for
more details.
Marek
On 01/08/16 19:23, Zhaohua Meng wrote:
>
> I wrote a user federation SPI implementation to integrate our internal
> user management. Particularly, an implementation of
> org.keycloak.models.UserFederationProviderFactory and
> org.keycloak.models.UserFederationProvider.
>
> My question is, how do you configure it in the keycloak-server.json?
>
> The documentation gave example for event listener but not user
> federation. Following the doc with similar approach I tried “{
> “userFederation”: { “my-impl”: { “myProperty”:””, ...} …}}”, and all
> kinds of combinations like that but nothing worked. I’d really
> appreciate if you can share some experience here.
>
> I’m quoting the doc in this regard here:
> https://keycloak.gitbooks.io/server-developer-guide/content/v/2.0/topics/providers.html#providers
>
> ...…
>
> Configuring a provider
>
> You can pass configuration options to your provider by setting them in
> keycloak-server.json. For example to set the max value for
> my-event-listener add:
>
> {
>
> "eventsListener": {
>
> "my-event-listener": {
>
> "max": 100
>
> }
>
> }
>
> }
>
> …..
>
> Thanks,
>
> --
>
> Zhaohua Meng
>
> Business Intelligence, AppNexus
>
> 973-936-8028 (cell)
>
> 973-415-8028 (home)
>
>
>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160801/e44dc02e/attachment-0001.html
More information about the keycloak-user
mailing list