[keycloak-dev] Bug / un-intended behaviour in jpa RealmAdapter?

Martin Hardselius martin.hardselius at gmail.com
Thu Mar 2 08:29:50 EST 2017


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


More information about the keycloak-dev mailing list