2 Replies Latest reply on Feb 7, 2016 9:02 PM by dcdh1983

    Picketlink IDM missing loginName attribute for a new user in AttributeTypeEntity

    dcdh1983

      Hello,

       

      When I want to authenticate an User, Picketlink is using the user's LoginName to retrieve him first then check is password.

       

      For retrieving an User Picketlink use this SQL request:

       

      select identityty0_.id as col_0_0_

      from IdentityTypeEntity identityty0_

      inner join AttributedTypeEntity identityty0_1_ on identityty0_.id=identityty0_1_.id

      inner join PartitionTypeEntity partitiont1_ on identityty0_.partition_id=partitiont1_.id

      inner join AttributedTypeEntity partitiont1_1_ on partitiont1_.id=partitiont1_1_.id

      where partitiont1_.id='2ff039b6-f2c9-469c-83cf-9a1068e5d703'

      and identityty0_.typeName='org.picketlink.idm.model.basic.User'

      and (identityty0_.id in (select attributet2_.owner_id from AttributeTypeEntity attributet2_

      where attributet2_.name='loginName'

      and attributet2_.value='rO0ABXQABGphbmU='

      group by attributet2_.owner_id having count(attributet2_.owner_id)=1));

       

      Most important part is this one :

       

      select attributet2_.owner_id from AttributeTypeEntity attributet2_

      where attributet2_.name='loginName'

      and attributet2_.value='rO0ABXQABGphbmU='

      group by attributet2_.owner_id having count(attributet2_.owner_id)=1

       

      Picketlink check for the attribute loginName in AttributeTypeEntity.

       

      However, when I am creating an User using this code:

       

      User newUser = new User(loginName);

      newUser.setEmail(email);

      newUser.setEnabled(true);

      identityManager.add(newUser);

      identityManager.updateCredential(newUser, new Password(password));

       

      there is no attribut called loginName defined for my User.

       

      I am missing somethings ?

       

      I am using picketlink 2.7.0 in wildfly 9.0.2.

       

      Regards,

       

      Damien