[keycloak-dev] advanced claim support
Marek Posolda
mposolda at redhat.com
Tue Feb 10 09:27:37 EST 2015
On 9.2.2015 19:12, Bill Burke wrote:
>
>
> On 2/9/2015 4:18 AM, Marek Posolda wrote:
>> On 6.2.2015 17:04, Michael Gerber wrote:
>>>
>>>> Am 06.02.2015 um 16:32 schrieb Bill Burke <bburke at redhat.com>:
>>>>
>>>> Wrote this awhile ago. I'm starting on this now. Discuss now, or
>>>> forever hold your peace :)
>>>>
>>>> Current UserModel.attributes will be used for internal bookkeeping
>>>> only.
>>>> Going to add a new "UserProfileType", "UserProfileValue" (name TBD)
>>>> type that contains:
>>>>
>>>> UserProfileType:
>>>> * id
>>>> * name
>>>> * .css type
>>>> * type (bool, int, date, etc.)
>>>> * boolean displayOnRegistrationPage
>>>>
>>>> Question, do I need a .css id to plug in a value too? How would we
>>>> display the german label name for „phone“?
>>> The labels and messages are currently stored in a messages.properties
>>> file.
>>> The best way to internationalize it, would be to create multiple
>>> property files (messages_de.properties, messages_fr.properties).
>>> So you should add a „String label“ field to the UserProfileType, to
>>> map a label in the properties file.
>> IMO it will be good if people are able to localize their claims directly
>> in admin console without need to edit some properties files.
>> So maybe UserProfileType can contain mapping of locales to the "name" in
>> particular language. Something like:
>>
>> Map<String, String> localeMappings;
>>
>> on UserProfileType. This will allow people to configure labels for their
>> claims directly in admin console. So they can specify that "phone" label
>> should be available in "English" and "telefon" in "Czech" etc. Maybe we
>> can later provide some pre-defined labels for well-known claims (like
>> phone) in supported languages when we are going later to add
>> localization support.
>>
>
> Not sure I agree. They will need to edit themes to provide
> localization. Just providing support for claim localization, leaves
> out the entire screen they are painted on.
>
>
I was suspect that we will provide localization for our screens? And
hopefully contributors from community will help us too with translations
:-)
Assuming that Keycloak screens will have localization support for some
languages, people would need just to provide localization for their
custom claims. Maybe we can have some "predefined" translations for well
known claims (phone, firstName, lastName, email, street etc). However
for custom domain-specific claims, people can translate them manually
and to me it looks more friendly if they can do it in admin console.
IMO ideal state is that people can localize claims without need to
update any property files... That would be better OOTB experience.
Marek
More information about the keycloak-dev
mailing list