Package main.controller.account.password
Class PasswordManager
java.lang.Object
main.controller.account.password.PasswordManager
A class manages the password of a user
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidchangePassword(User user, String oldPassword, String newPassword) Changes the password of the userstatic booleancheckPassword(User user, String password) Checks if the password is correct
- 
Constructor Details- 
PasswordManagerpublic PasswordManager()
 
- 
- 
Method Details- 
checkPasswordChecks if the password is correct- Parameters:
- user- the user whose password is to be checked
- password- the password to be checked
- Returns:
- true if the password is correct, false otherwise
 
- 
changePasswordpublic static void changePassword(User user, String oldPassword, String newPassword) throws PasswordIncorrectException Changes the password of the user- Parameters:
- user- the user whose password is to be changed
- oldPassword- the old password
- newPassword- the new password
- Throws:
- PasswordIncorrectException- if the old password is incorrect
 
 
-