[keycloak-user] mappers and user federation

Corbetta, Francesco fco at iec.ch
Fri Mar 23 09:01:38 EDT 2018


Hello

I wrote a JPA federation provider which works perfectly but I'm not able to add claims via the client mappers table.
For example, I have a User property "gender" which is mapped to my UserModel getGender method, which does mapping to the underline hibernate entity.

I configured the mapper as:
Consent required: Off
Mapper Type: user Property
Property: gender
Token Claim Name: person_gender
Clain JSON Type: string
Add ID token: ON
Add to Access Token: ON
Add to userinfo: ON

While the hibernate entity correctly loads the value, the claim is never included in the userinfo object.
To develop the provider I basically followed the user-storage-jpa example.

Server version is 3.4.0.Final

Best regards
Francesco



More information about the keycloak-user mailing list