<div dir="ltr">It should be possible to map claims from the userinfo endpoint, but attributes are only mapped on first login. We don't currently update attributes on subsequent logins. Maybe you are trying with an existing user?<div class="gmail_extra"><br><div class="gmail_quote">On 12 August 2016 at 07:08, Peter Nalyvayko <span dir="ltr"><<a href="mailto:petervn1@yahoo.com" target="_blank">petervn1@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"><div>Hello,</div><div>It seems that there is no way to map the claims returned by the /userinfo endpoint to user attributes. </div><div>I set up an OIDC identity broker to enable external identity broker authentication in keycloak. Some of the </div><div dir="ltr">relevant information about the user, such as language, locale, etc. are available only by calling the /userinfo point, </div><div dir="ltr">so I wanted to map the claims returned by the endpoint to the user attributes using the available mappers.</div><div dir="ltr">Unfortunately, it seems that the Attribute Mapper can maps ID token or </div><div>Access token claims (User Attribute Mapper), and completely ignores the userInfo claims. </div><div>Searching through the codebase, I've found that OIDC identity broker calls </div><div>AbstractJsonUserAttributeMappe<wbr>r.storeUserProfileForMapper to store the user profile</div><div dir="ltr">returned by the call to /userinfo endpoint in the user's context data. However, there seems to be no way </div><div>(without modifying the code that is) to map that data to the attributes of the </div><div>federated user created by the OIDC identity broker.</div><div><br></div><div>Am I missing something here or this functionality is not available out of the box for OIDC identity broker?</div><div><br></div><div>I am using keycloak version 2.1.0 </div><div><br></div><div>Thank you,</div><div dir="ltr">--Peter</div></div></div><br>______________________________<wbr>_________________<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/<wbr>mailman/listinfo/keycloak-dev</a><br></blockquote></div><br></div></div>