2 Replies Latest reply on Jan 1, 2009 3:02 PM by Bradley Smith

    JpaIdentityStore and custom PasswordHash

    Bradley Smith Newbie

      according to the Seam reference documentation:

      If an application requires a hash algorithm that isn't supported natively by Seam, it is possible to extend the PasswordHash component to implement other hashing algorithms.

      However, after extendind PasswordHash, like such:

      @Install(precedence = Install.APPLICATION)
      public class MyPasswordHash extends PasswordHash {

          public String generateHash(String passwordToHash) {


      and configuring my app to use JpaIdentityStore, I noticed that my custom PasswordHash was not being invoked on login.  I looked at the JpaIdentityStore impl and found that it's making calls like this

      PasswordHash.instance().generateSaltedHash(password, salt);

      as part of the authenticate(...) impl.  My question is how is it possible to have the JpaIdentityStore use my custom PasswordHash if it's directly using the the singleton-instance approach to find a PasswordHash, instead of looking up a PasswordHash from one of the Seam contexts?

      Brad Smith