[keycloak-dev] Custom federation - webservice

Marek Posolda mposolda at redhat.com
Wed Dec 9 13:39:24 EST 2015


On 09/12/15 19:33, Jorge M. wrote:
>
> I'm developing a custom federation that communicates with my user 
> repository via webservices.
> Probably this is a very strange scenario for a federation but that's 
> the unique way that I have to communicate with the repository.
>
> My problem is that, as the webservices only exposes methods such as 
> createUser and updateUser, I'm having problems with registrations and 
> user profile updates because I'm not being able to do atomic calls to 
> the webservice methods, with all the information that I need.
>
> As far as I know, from the properties file example and from the ldap 
> federation source (probably I'm missing something) it seems that the 
> federation api is intended to update and sync attribute by attribute 
> (Keycloak <-> Federation).
> Am i wrong? Do you suggest another approach? Should I give up from 
> having a federation that uses a webservice?
>
You can use "transaction wrapper", which will allow you to store all the 
updates to user locally, but send the UPDATE request to your webservice 
later at transaction commit time. You may need to create custom 
transaction and enlist it with Keycloak TransactionManager.

This is what we have for LDAP federation provider right now. See 
TxAwareLDAPUserModelDelegate.

Marek
>
> Thank you.
>
>
>
> _______________________________________________
> keycloak-dev mailing list
> keycloak-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20151209/2e57ed5c/attachment.html 


More information about the keycloak-dev mailing list