[FIX] Фикс авторизации сервера 2

This commit is contained in:
Gravit 2019-01-28 21:08:06 +07:00
parent 2937d70866
commit 43de166d22
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -35,9 +35,9 @@ public AuthResponse(String login, String password, int authid, OshiHWID hwid) {
}
public int authid;
public ConnectTypes type;
public ConnectTypes authType;
public OshiHWID hwid;
enum ConnectTypes
public enum ConnectTypes
{
SERVER,CLIENT
}
@ -56,7 +56,7 @@ public void execute(WebSocketService service, ChannelHandlerContext ctx, Client
AuthProvider.authError(LaunchServer.server.config.authRejectString);
return;
}
if (type == ConnectTypes.SERVER &&!clientData.checkSign) {
if (authType == ConnectTypes.SERVER &&!clientData.checkSign) {
AuthProvider.authError("Don't skip Launcher Update");
return;
}
@ -81,7 +81,8 @@ public void execute(WebSocketService service, ChannelHandlerContext ctx, Client
throw new AuthException("You profile not found");
}
UUID uuid = LaunchServer.server.config.authHandler.auth(aresult);
LaunchServer.server.config.hwidHandler.check(hwid, aresult.username);
if(authType == ConnectTypes.CLIENT)
LaunchServer.server.config.hwidHandler.check(hwid, aresult.username);
LaunchServer.server.authHookManager.postHook(context, clientData);
clientData.isAuth = true;
clientData.permissions = aresult.permissions;