Expose realm attributes to templates

598 views
Skip to first unread message

nethaji periyasamy

unread,
Apr 12, 2021, 12:33:44 PM4/12/21
to Keycloak Dev
Hello,

I would like to set custom configuration per realm and be able to access it in the template (for instance to store a different google analytics key per realm).
 
Realms attributes seems to be a good place to store this information but they are not exposed to the templates.

Do you think that adding a getAttributes method in the RealmBean class could be a good approach?


The same way it is done in the AccountBean class:


Alternatively, I can probably write an extension to expose the realm attributes to the template following the same principle that is used here:  


I found a similar question that has been already asked in the dev mailing list: (https://groups.google.com/g/keycloak-dev/c/KPmH_9eXvUU/m/l_O3KYjeAwAJ).

Which approach would makes more sense, a pull request on Keycloak repo or an extension?

Thanks a lot in advance for any comments to my proposal.

Regards,
Nethaji

Reply all
Reply to author
Forward
0 new messages