13
Views
6
Comments
Solved
How to validate pre-existing encrypted Password stored in user table?

I have Password stored in User table which is encrypted. My requirement is every time user logins into the system his Username and Password should be checked against User DB fields. Not sure how to compare Password field with DB field.

Rank: #292
Solution

Hi Nimo,

You can use ValidatePassword action available in PlatformPasswordUtils API.

ValidatePassword

Validates a password against the expected salted password hash.

Inputs

1. PlainTextPassword : Pass the user entered password
Type: Text. Mandatory.
The password in plain text.
2.  SaltedHashedPassword : Pass the encrypted password of user from DB by filtering aggregate with the current username.
Type: Text. Mandatory.
The expected password, salted and hashed.

Outputs

IsValid
Type: Boolean.
Returns true if the password matches the given salted and hashed password.

Hope it helps, Thanks

Rank: #362

When logging in as a user, the username/password will be automatically validated against the user db fields. 

Why would you like to compare the password with the DB field? 

KR Hans