<div dir="ltr"><div><div>We came across an issue when integrating a custom OIDC IDP and mapping roles into it. When we have a list of external roles to map into Keycloak roles, the process fails.<br><br></div>The issue is at the bottom of the <span class="">valueEquals</span>(<span class="">String</span>, <span class="">Object</span><span class=""></span>) method in the AbstractClaimMapper class. When the incoming Object is a list, it just performs the comparison with the first element and returns...<br><br>...<br>} <span class="">else</span> <span class="">if</span> (value <span class="">instanceof</span> <span class="">List</span>) {<br><span class="">  List</span> list <span class="">=</span> (<span class="">List</span>)value;<br><span class="">  for</span> (<span class="">Object</span> val <span class="">:</span> list) {<br>    <span class="">return</span> valueEquals(desiredValue, val);<br>  }<br>}<br>...<br><br></div>Instead the code should be something like this:<br>...<br>} <span class="">else</span> <span class="">if</span> (value <span class="">instanceof</span> <span class="">List</span>) {<br><span class="">  List</span> list <span class="">=</span> (<span class="">List</span>)value;<br><span class="">  for</span> (<span class="">Object</span> val <span class="">:</span> list) {<br>    if (valueEquals(desiredValue, val)) return true;<br>  }<br>}<br><div>...<br><br><br></div><div>Regards,<br></div><div>Lohitha<br></div></div>