title: Password Resetting in Java
body: <p>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. </p>
  
  <p>I know the general technique:</p>
  
  <ol>
  <li>"Password reset" button</li>
  <li>Ask user to confirm its identity - via entering email.</li>
  <li>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) </li>
  <li><p>User goes to token link provided webpage, where new password field awaiting.</p>
  
  <ul>
  <li>Token has time validity, judging from other similar questions ideally few hours.</li>
  <li>Don't use security questions as they infinitely impractical.</li>
  </ul></li>
  </ol>
  
  <p>What I am asking is some pseudo-code or example implementation on how to generate tokens and send token mails to users.</p>