Could anyone please provide resources on how to reset password in Java web application connected to db where password stored as hashed(password+salt+secretphrase)? I am also using Spring, so if it has something in this area please identify.
I know the general technique:
- “Password reset” button
- Ask user to confirm its identity – via entering email.
- Token is generated and send to mail adress. (how ? It is hash of what? which properties? how to send automatic mail message?-never done that before)
-
User goes to token link provided webpage, where new password field awaiting.
- Token has time validity, judging from other similar questions ideally few hours.
- Don’t use security questions as they infinitely impractical.
What I am asking is some pseudo-code or example implementation on how to generate tokens and send token mails to users.
When you say java, do you mean web application in java ?
Your functionality needs a lot of different components.
You can use JavaMail api for sending emails.
Spring framework has many components, you can use it for frontend, DB calls and for sending mail. You need to go through the documentation to learn about them.