You will need to extend JpaIdentityStore and override the createUser() method. In particular, the following line will need to be changed to create an instance of the correct user type:
Object user = userClass.newInstance();
Actually, if you'd like to raise a feature request in JIRA, I can probably abstract the user instance creation out to another method which can also raise some kind of event to allow you to manipulate the new object.
i raised a feature request - https://jira.jboss.org/jira/browse/JBSEAM-3846
also i implemented this functionality (i posted the zip).
i made three little modifications to:
IdentityManager, IdentityStore and JpaIdentityStore. The application ran as expected. I did run into a validation problem: since password is hashed, length validator failed (i had 15 max set) so i set hash to
none. But again i definately had to validate on input. Is there hashing algorithm that at the end there will be same number of characters?
p.s i did not extend IdentityManager, IdentityStore and JpaIdentityStore since i would have to go through configuring new classes (how do i do this?) for a single method only. I decided to add methods instead. Please review it.