[keycloak-dev] Preferred storage mechanism for custom settings

Mitya mitya at cargosoft.ru
Fri Jul 15 14:28:57 EDT 2016


Stian,

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?

I've yet come up with the following:

RealmModel realm = session.getContext().getRealm();
RealmAdapter adapter = (RealmAdapter)
session.getProvider(RealmProvider.class).getRealm(realm.getId());


> Realm attributes should be perfect for that
> 
> > On 12 July 2016 at 13:42, Mitya <mitya at cargosoft.ru> wrote:
> > Hi,
> > > > > > > > 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?
> > 
> > Thx,
> > Mitya
> > 
> > 
> > _______________________________________________
> > 
> > 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/20160715/d856a13c/attachment.html 


More information about the keycloak-dev mailing list