1 Reply Latest reply on Jan 13, 2010 1:32 AM by Wilfredo Alfaro

    seam-gen with add-identity-management issue

    Yann Lambret Newbie
      Hi all,

      I've just started using Seam for a few days, and I'm quite impressed by all the features provided. I've created a little test project with the seam-gen command, with support of identity management. I'm facing some issues with the code generated by the seam add-identity-management option.

      When I'm creating a new user, it is persisted in the database, but the password is stored in plain text despite of the UserAccount's @UserPassword(hash = "SHA") annotation. I took a look at the UserAccountHome and the related class EntityHome, and this behavior makes sense considering the persistence is made by using the EntityManager directly, and not the Identity Manager features.

      When I try to login with this new user, the authentication fails and it makes sense too, because the login.xhtml relies on the credentials object, and thus expects (at least I guess so) an encrypted password from the database.

      Could you please tell me if I'm right about this, or should the generated code works "out of the box" ? As I see it, I have to modify the user creation mechanism for the application to work as expected.

      Thanks for your answers,

        • 1. Re: seam-gen with add-identity-management issue
          Wilfredo Alfaro Newbie
          Hi Yann,

          I've been using Seam 2.2.0 from a few weeks ago and the seam add-identity-management feature has always worked right out of the box for me, so there has to be a problem there. I think you should check if you actually have the identity store component activated in order to get the @UserPassword(hash = "SHA") annotation to work properly.

          Check this link http://seamframework.org/Documentation/AddIdentityManagementToASeamgenProject for further information on that. Check Step 4.

          Hope this helps,