#930 Create registration captcha manager

- Introduce registration captcha manager, rename login captcha manager accordingly
- Integrate reg. captcha manager into /register command

Open points:
- Refactor common captcha functionality into abstract superclass
- If captcha before /register necessary, show appropriate message to player immediately
- Unit tests
This commit is contained in:
ljacqu
2017-12-01 21:12:35 +01:00
parent 67a6a42dfe
commit 33904c09e9
11 changed files with 220 additions and 69 deletions
@@ -29,7 +29,7 @@ public final class SecuritySettings implements SettingsHolder {
newProperty("Security.console.logConsole", true);
@Comment("Enable captcha when a player uses wrong password too many times")
public static final Property<Boolean> USE_CAPTCHA =
public static final Property<Boolean> ENABLE_LOGIN_FAILURE_CAPTCHA =
newProperty("Security.captcha.useCaptcha", false);
@Comment("Max allowed tries before a captcha is required")
@@ -44,6 +44,10 @@ public final class SecuritySettings implements SettingsHolder {
public static final Property<Integer> CAPTCHA_COUNT_MINUTES_BEFORE_RESET =
newProperty("Security.captcha.captchaCountReset", 60);
@Comment("Require captcha before a player may register?")
public static final Property<Boolean> ENABLE_CAPTCHA_FOR_REGISTRATION =
newProperty("Security.captcha.requireForRegistration", false);
@Comment("Minimum length of password")
public static final Property<Integer> MIN_PASSWORD_LENGTH =
newProperty("settings.security.minPasswordLength", 5);