mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FIX] Фикс авторизации сервера 2
This commit is contained in:
parent
2937d70866
commit
43de166d22
1 changed files with 5 additions and 4 deletions
|
@ -35,9 +35,9 @@ public AuthResponse(String login, String password, int authid, OshiHWID hwid) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int authid;
|
public int authid;
|
||||||
public ConnectTypes type;
|
public ConnectTypes authType;
|
||||||
public OshiHWID hwid;
|
public OshiHWID hwid;
|
||||||
enum ConnectTypes
|
public enum ConnectTypes
|
||||||
{
|
{
|
||||||
SERVER,CLIENT
|
SERVER,CLIENT
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ public void execute(WebSocketService service, ChannelHandlerContext ctx, Client
|
||||||
AuthProvider.authError(LaunchServer.server.config.authRejectString);
|
AuthProvider.authError(LaunchServer.server.config.authRejectString);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (type == ConnectTypes.SERVER &&!clientData.checkSign) {
|
if (authType == ConnectTypes.SERVER &&!clientData.checkSign) {
|
||||||
AuthProvider.authError("Don't skip Launcher Update");
|
AuthProvider.authError("Don't skip Launcher Update");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -81,6 +81,7 @@ public void execute(WebSocketService service, ChannelHandlerContext ctx, Client
|
||||||
throw new AuthException("You profile not found");
|
throw new AuthException("You profile not found");
|
||||||
}
|
}
|
||||||
UUID uuid = LaunchServer.server.config.authHandler.auth(aresult);
|
UUID uuid = LaunchServer.server.config.authHandler.auth(aresult);
|
||||||
|
if(authType == ConnectTypes.CLIENT)
|
||||||
LaunchServer.server.config.hwidHandler.check(hwid, aresult.username);
|
LaunchServer.server.config.hwidHandler.check(hwid, aresult.username);
|
||||||
LaunchServer.server.authHookManager.postHook(context, clientData);
|
LaunchServer.server.authHookManager.postHook(context, clientData);
|
||||||
clientData.isAuth = true;
|
clientData.isAuth = true;
|
||||||
|
|
Loading…
Reference in a new issue