Yes, it is bug. Thanks!
So now it's possible to add more identityProvider mappers with same name
into single identityProvider.
Could you please create JIRA for it? Or even better also send PR? Will
be also good to add a unit test into IdentityProviderTest that creating
more mappers with same name will fail once fix is added. Just in case
you are willing to contribute that :)
Thanks,
Marek
On 02/03/17 14:29, Martin Hardselius wrote:
The below piece of code seems faulty to me. Shouldn't it pass
model.getName() as the second arg to getIdentityProviderMapperByName
instead?
org.keycloak.models.jpa.RealmAdapter
@Override
public IdentityProviderMapperModel
addIdentityProviderMapper(IdentityProviderMapperModel model) {
if (getIdentityProviderMapperByName(model.getIdentityProviderAlias(),
model.getIdentityProviderMapper()) != null) {
throw new RuntimeException("identity provider mapper name must be
unique per identity provider");
}
// ...
}
Martin
_______________________________________________
keycloak-dev mailing list
keycloak-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-dev