mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-16 03:59:14 +03:00
c562f48384
* [FIX] Фикс отправки json запросов к mojang * [FEATURE] [CRITICAL] AuthProviderPair * [FIX] Фикс автогенерации конфига * [FIX] брана проверка имени в Reload и Reconfigurable менеджерах * [FEATURE] textureProvider внесен в AuthProviderPair * [FIX] Реализация Request части и фикс ServerWrapper * [ANY] Обновление модулей
48 lines
1.3 KiB
Java
48 lines
1.3 KiB
Java
package ru.gravit.launchserver.socket;
|
|
|
|
import ru.gravit.launcher.ClientPermissions;
|
|
import ru.gravit.launcher.profiles.ClientProfile;
|
|
import ru.gravit.launchserver.LaunchServer;
|
|
import ru.gravit.launchserver.auth.AuthProviderPair;
|
|
import ru.gravit.utils.helper.LogHelper;
|
|
|
|
public class Client {
|
|
public long session;
|
|
public String auth_id;
|
|
public long timestamp;
|
|
public Type type;
|
|
public ClientProfile profile;
|
|
public boolean isAuth;
|
|
public boolean checkSign;
|
|
public ClientPermissions permissions;
|
|
public String username;
|
|
public LogHelper.OutputEnity logOutput;
|
|
|
|
public transient AuthProviderPair auth;
|
|
|
|
public Client(long session) {
|
|
this.session = session;
|
|
timestamp = System.currentTimeMillis();
|
|
type = Type.USER;
|
|
isAuth = false;
|
|
permissions = ClientPermissions.DEFAULT;
|
|
username = "";
|
|
checkSign = false;
|
|
}
|
|
|
|
//Данные авторизации
|
|
public void up() {
|
|
timestamp = System.currentTimeMillis();
|
|
}
|
|
public void updateAuth()
|
|
{
|
|
if(!isAuth) return;
|
|
if(auth_id.isEmpty()) auth = LaunchServer.server.config.getAuthProviderPair();
|
|
else auth = LaunchServer.server.config.getAuthProviderPair(auth_id);
|
|
}
|
|
|
|
public enum Type {
|
|
SERVER,
|
|
USER
|
|
}
|
|
}
|