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

Martin Hardselius martin.hardselius at gmail.com
Thu Mar 2 09:58:51 EST 2017


Yep. I'll JIRA it and send a PR.

On Thu, 2 Mar 2017 at 15:53 Marek Posolda <mposolda at redhat.com> wrote:

> 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 listkeycloak-dev at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/keycloak-dev
>
>
>


More information about the keycloak-dev mailing list