<div dir="ltr"><div><div>When I wrote:</div><div>&quot;I have developed a custom user federation provider. I notice that Keycloak create several User Federation Providers during a single authentication flow callin KeycloakModelUtils.getFederationProviderInstance multiple times...&quot;</div><div>I tried to write:</div><div>&quot;I have developed a custom user federation provider. I notice that Keycloak creates several User Federation Providers during a single authentication flow, calling to KeycloakModelUtils.getFederationProviderInstance multiple times...&quot;</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-09 12:59 GMT-03:00 Ariel Carrera <span dir="ltr">&lt;<a href="mailto:carreraariel@gmail.com" target="_blank">carreraariel@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Marek, Stian, Bill.... <div><br><div><div>I have developed a custom user federation provider. I notice that Keycloak create several User Federation Providers during a single authentication flow callin KeycloakModelUtils.getFederationProviderInstance multiple times...</div><div><br></div><div>To prevent create two or three user federation providers per request, I need implement into my custom Federation Provider a logic for search an instance of my custom provider into the Keycloak session and if not exists then create a new one. So... there would be better do it into the method KeycloakModelUtils.getFederationProviderInstance?</div><div><br></div><div>People that implements a custom user federation providers... Do people need to create multiple instances per request of the same provider?</div><div><br></div><div><br></div><div>By the way, I have extended the keycloak SPI to perform use of infinispan cache when a custom user provider try to validate a user or get some data from a user federation provider during process. Maybe this could be useful to other users... if you wants to add this spi, I can try to prepare a pull request to you.<br></div><div><br></div><div><br></div><div>Thanks</div></div><span class="HOEnZb"><font color="#888888"><div><div>-- <br></div><div data-smartmail="gmail_signature">Ariel Carrera</div>
</div></font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Tatú</div>
</div>