[FIX] Фикс ошибки компиляции AuthResponse

This commit is contained in:
Gravit 2019-02-07 08:15:35 +07:00
parent 7024c1325c
commit d278641add

View file

@ -22,6 +22,7 @@
public class AuthResponse implements JsonResponseInterface { public class AuthResponse implements JsonResponseInterface {
public String login; public String login;
public String client; public String client;
public String customText;
public String password; public String password;
@ -67,9 +68,10 @@ public void execute(WebSocketService service, ChannelHandlerContext ctx, Client
{ {
AuthProvider.authError("authType: SERVER not allowed for this account"); AuthProvider.authError("authType: SERVER not allowed for this account");
} }
ru.gravit.launchserver.response.auth.AuthResponse.AuthContext context = new ru.gravit.launchserver.response.auth.AuthResponse.AuthContext(0, login, password.length(), client, null, false); ru.gravit.launchserver.response.auth.AuthResponse.AuthContext context = new ru.gravit.launchserver.response.auth.AuthResponse.AuthContext(0, login, password.length(),customText, client, null, false);
AuthProvider provider = LaunchServer.server.config.authProvider[authid]; AuthProvider provider = LaunchServer.server.config.authProvider[authid];
LaunchServer.server.authHookManager.preHook(context, clientData); LaunchServer.server.authHookManager.preHook(context, clientData);
provider.preAuth(login,password,customText,ip);
AuthProviderResult aresult = provider.auth(login, password, ip); AuthProviderResult aresult = provider.auth(login, password, ip);
if (!VerifyHelper.isValidUsername(aresult.username)) { if (!VerifyHelper.isValidUsername(aresult.username)) {
AuthProvider.authError(String.format("Illegal result: '%s'", aresult.username)); AuthProvider.authError(String.format("Illegal result: '%s'", aresult.username));