I’m on Cuba Platform 7.2 and I have a requirement where user has to reenter their password before editing sensitive details. How do I verify the password from PasswordField
with the encrypted one stored in sec_user
?
If I remember correctly, I should use ‘passwordEncryption’ to generate a hash of the user’s password.
@Inject
private PasswordEncryption passwordEncryption;
.....
String passwordHash = passwordEncryption.getPasswordHash(user.getId(), password);
Hi @andrey_vb thanks for the response. I think I’ve found it thanks to your clue.
It’s boolean checkPassword(User user, String rawPassword);
inside PasswordEncryption