<html><head></head><body><div>Stian,</div><div><br></div><div>In my provider, session.getContext().getRealm() returns an instance of org.keycloak.models.cache.infinispan.RealmAdapter. But in order to be able to manage attributes, we need an org.keycloak.models.jpa.RealmAdapter. What's the best way to obtain it?</div><div><br></div><div>I've yet come up with the following:</div><div><br></div><div>RealmModel realm = session.getContext().getRealm();</div><div>RealmAdapter adapter = (RealmAdapter) session.getProvider(RealmProvider.class).getRealm(realm.getId());</div><div><br></div><div><br></div><blockquote type="cite"><div dir="ltr">Realm attributes should be perfect for that</div><div class="gmail_extra"><br><div class="gmail_quote">On 12 July 2016 at 13:42, Mitya <span dir="ltr"><<a href="mailto:mitya@cargosoft.ru" target="_blank">mitya@cargosoft.ru</a>></span> wrote:<br><blockquote type="cite"><div><div>Hi,</div><div><br></div><div>I'm developing a KeyCloak extension, and I want some custom (per-realm) parameters to be tuned via the GUI form. Speaking of the storage mechanism for my settings, are realm attributes suitable for that? or should I create a dedicated custom entity instead?</div><div><br></div><div>Thx,</div><div>Mitya</div></div><br>_______________________________________________<br>
keycloak-dev mailing list<br>
<a href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br></blockquote></div><br></div>
</blockquote></body></html>