1 package club.wpia.gigi.passwords;
3 import club.wpia.gigi.GigiApiException;
4 import club.wpia.gigi.dbObjects.Name;
7 * A strategy to check whether a password is acceptable for use or not.
9 public interface PasswordChecker {
12 * Checks if a password is acceptable for use.
13 * Most implementations judge a password’s strength in some way
14 * and reject weak passwords.
16 * @param password The password to check.
17 * @param nameParts The name parts of the user that wants to use this password.
18 * @param email The email address of the user that wants to use this password.
19 * @return {@code null} if the password is acceptable,
20 * otherwise a {@link GigiApiException} with an appropriate error message.
22 public GigiApiException checkPassword(String password, String[] nameParts, String email);