Package com.finiac.exception

Examples of com.finiac.exception.ChangePasswordException


 
  private void changePassword(User user, String currentPassword, String newPassword1, String newPassword2) throws Exception
  {
    String cryptCurPassword = DigestUtils.sha256Hex(currentPassword +passwordHashPadding);
    if(!user.getPassword().equals(cryptCurPassword))
      throw new ChangePasswordException();
    if(!newPassword1.equals(newPassword2))
      throw new ChangePasswordException();
    if(newPassword1.length()<6)
      throw new ChangePasswordException();
    String cryptNewPassword = DigestUtils.sha256Hex(newPassword1 +passwordHashPadding);
    user.setPassword(cryptNewPassword);
    userDAO.updateUser(user);
  }
View Full Code Here

TOP

Related Classes of com.finiac.exception.ChangePasswordException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.