mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +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();
|
client.trustLevel.hardwareInfo = hardware.getHardwareInfo();
|
||||||
authSupportHardware.connectUserAndHardware(client.sessionObject, hardware);
|
authSupportHardware.connectUserAndHardware(client.sessionObject, hardware);
|
||||||
|
return new VerifySecureLevelKeyRequestEvent(false, false, createPublicKeyToken(client.username, client.trustLevel.publicKey), createHardwareToken(client.username, client.trustLevel.hardwareInfo));
|
||||||
} else {
|
} else {
|
||||||
logger.warn("AuthCoreProvider not supported hardware. HardwareInfo not checked!");
|
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));
|
return new VerifySecureLevelKeyRequestEvent(false, false, createPublicKeyToken(client.username, client.trustLevel.publicKey));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onJoinServer(String serverID, String username, Client client) {
|
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
|
@Override
|
||||||
|
|
|
@ -6,6 +6,7 @@ public class VerifySecureLevelKeyRequestEvent extends RequestEvent {
|
||||||
public boolean needHardwareInfo;
|
public boolean needHardwareInfo;
|
||||||
public boolean onlyStatisticInfo;
|
public boolean onlyStatisticInfo;
|
||||||
public String extendedToken;
|
public String extendedToken;
|
||||||
|
public String hardwareExtendedToken;
|
||||||
|
|
||||||
public VerifySecureLevelKeyRequestEvent() {
|
public VerifySecureLevelKeyRequestEvent() {
|
||||||
}
|
}
|
||||||
|
@ -20,6 +21,13 @@ public VerifySecureLevelKeyRequestEvent(boolean needHardwareInfo, boolean onlySt
|
||||||
this.extendedToken = extendedToken;
|
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
|
@Override
|
||||||
public String getType() {
|
public String getType() {
|
||||||
return "verifySecureLevelKey";
|
return "verifySecureLevelKey";
|
||||||
|
|
Loading…
Reference in a new issue