// check password
System.out.println("DEBUG: Authenticate Password");
// password security
logger.log(Level.INFO, "Authenticating password for User <" + credentials[0] + ">...");
String hashedPassword = this.passwordHash.generateHash(credentials[1]);
if(!user.matchPassword(hashedPassword))
{
logger.log(Level.WARNING, "Login attempted with bad password for User <" + credentials[0] + ">");
throw new AuthenticationException("An invalid password was given. Please check the password and try again.");
}
logger.log(Level.INFO, "Password authentication Success! <" + credentials[0] + ">");