mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 03:31:15 +03:00
[FIX] Bad login (MySQL + HWID)
This commit is contained in:
parent
8afa630546
commit
7bfa4ebdab
2 changed files with 10 additions and 2 deletions
|
@ -93,17 +93,17 @@ public VerifySecureLevelKeyRequestEvent onSuccessVerify(Client client) {
|
|||
}
|
||||
client.trustLevel.hardwareInfo = hardware.getHardwareInfo();
|
||||
authSupportHardware.connectUserAndHardware(client.sessionObject, hardware);
|
||||
return new VerifySecureLevelKeyRequestEvent(false, false, createPublicKeyToken(client.username, client.trustLevel.publicKey), createHardwareToken(client.username, client.trustLevel.hardwareInfo));
|
||||
} else {
|
||||
logger.warn("AuthCoreProvider not supported hardware. HardwareInfo not checked!");
|
||||
}
|
||||
return new VerifySecureLevelKeyRequestEvent(false, false, createPublicKeyToken(client.username, client.trustLevel.publicKey));
|
||||
}
|
||||
return new VerifySecureLevelKeyRequestEvent(false, false, createPublicKeyToken(client.username, client.trustLevel.publicKey));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onJoinServer(String serverID, String username, Client client) {
|
||||
return !enableHardwareFeature || (client.trustLevel != null && client.trustLevel.publicKey != null);
|
||||
return !enableHardwareFeature || (client.trustLevel != null && client.trustLevel.hardwareInfo != null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,6 +6,7 @@ public class VerifySecureLevelKeyRequestEvent extends RequestEvent {
|
|||
public boolean needHardwareInfo;
|
||||
public boolean onlyStatisticInfo;
|
||||
public String extendedToken;
|
||||
public String hardwareExtendedToken;
|
||||
|
||||
public VerifySecureLevelKeyRequestEvent() {
|
||||
}
|
||||
|
@ -20,6 +21,13 @@ public VerifySecureLevelKeyRequestEvent(boolean needHardwareInfo, boolean onlySt
|
|||
this.extendedToken = extendedToken;
|
||||
}
|
||||
|
||||
public VerifySecureLevelKeyRequestEvent(boolean needHardwareInfo, boolean onlyStatisticInfo, String extendedToken, String hardwareExtendedToken) {
|
||||
this.needHardwareInfo = needHardwareInfo;
|
||||
this.onlyStatisticInfo = onlyStatisticInfo;
|
||||
this.extendedToken = extendedToken;
|
||||
this.hardwareExtendedToken = hardwareExtendedToken;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType() {
|
||||
return "verifySecureLevelKey";
|
||||
|
|
Loading…
Reference in a new issue