Importing user account with hashed passwords

4
For a project we are looking to import users from an external system/database. The passwords are saved and stored as a md5 hash string. Is it possible to validate the password of a user against a md5 hashed string and how do I implement it?
asked
1 answers
3

Yes, you can use a java action to assign a new hashed value to a password attribute. Make sure that you put the hash as salt in front of the hash. In code:

IMendixObject myobject = //get the user from somewhere, argument from MF for example
MendixHashString password = (MendixHashString ) myObject.getMember(this.getContext(), "Password");
password.setHash(this.getContext(), "{md5}" + myHashString);
Core.commit(this, myobject);
answered