ключ теперь не поле бд а отдельный файл на сервере.

This commit is contained in:
2025-02-19 01:10:25 +03:00
parent 7eba13370d
commit 024f274360
8 changed files with 37 additions and 26 deletions

View File

@@ -26,7 +26,7 @@ public class CheckAccount extends ComponentsServerPass {
//подтвердили почту. теперь проверяем ее роль на сервере. если на сервере нет акка будет создан
if (SendRequest(ServerCode.GetUserAccountByEmail, "",Global.mainModule.getAccount())){
Global.mainModule.setAccount((UserAccount) request.server_response.object);
FileUtils.writeStringToFile(keyFile, Global.mainModule.getAccount().security_key);
FileUtils.writeStringToFile(keyFile, request.server_response.arg);
}
}
}
@@ -34,7 +34,7 @@ public class CheckAccount extends ComponentsServerPass {
protected boolean canStart(Object... args) throws Exception {
Global.mainModule.getAccount().role = AccountRole.Undefined;
Global.normalProperties.Update();
keyFile = new File(Global.KeyDirectory, "key");
keyFile = new File(Global.KeysDirectory, "key");
//--
//1. Ищем ключ.
if (keyFile.exists()) {