diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java index 044e8b03..33c43394 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java @@ -96,7 +96,7 @@ public void invoke(String... args) throws Exception { if (report.success) { logger.info("Password correct"); } else { - if (report.needMoreFactor) { + if (report.needMoreFactors) { if (report.factors.size() == 1 && report.factors.get(0) == -1) { logger.info("Password not correct: Required 2FA"); } else { @@ -345,30 +345,30 @@ public static class PasswordVerifyReport { public static final PasswordVerifyReport FAILED = new PasswordVerifyReport(false); public static final PasswordVerifyReport OK = new PasswordVerifyReport(true); public final boolean success; - public final boolean needMoreFactor; + public final boolean needMoreFactors; public final List factors; public PasswordVerifyReport(boolean success) { this.success = success; - this.needMoreFactor = false; + this.needMoreFactors = false; this.factors = List.of(); } public PasswordVerifyReport(int nextFactor) { this.success = false; - this.needMoreFactor = true; + this.needMoreFactors = true; this.factors = List.of(nextFactor); } public PasswordVerifyReport(List factors) { this.success = false; - this.needMoreFactor = false; + this.needMoreFactors = false; this.factors = Collections.unmodifiableList(factors); } - private PasswordVerifyReport(boolean success, boolean needMoreFactor, List factors) { + private PasswordVerifyReport(boolean success, boolean needMoreFactors, List factors) { this.success = success; - this.needMoreFactor = needMoreFactor; + this.needMoreFactors = needMoreFactors; this.factors = factors; } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java index b157a09a..7d3a3960 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java @@ -190,7 +190,7 @@ public AuthReport auth(AuthResponse.AuthContext context, AuthRequest.AuthPasswor internalAuth(context.client, context.authType, context.pair, user.getUsername(), user.getUUID(), user.getPermissions(), result.isUsingOAuth()); return result; } else { - if (report.needMoreFactor) { + if (report.needMoreFactors) { if (report.factors.size() == 1 && report.factors.get(0) == -1) { throw new AuthException(AuthRequestEvent.TWO_FACTOR_NEED_ERROR_MESSAGE); }