Launcher/LaunchServer/src/main/java/ru/gravit/launchserver/socket/Client.java
Gravit c562f48384
Вернуть коммиты на место (#197)
* [FIX] Фикс отправки json запросов к mojang

* [FEATURE] [CRITICAL] AuthProviderPair

* [FIX] Фикс автогенерации конфига

* [FIX] брана проверка имени в Reload и Reconfigurable менеджерах

* [FEATURE] textureProvider внесен в AuthProviderPair

* [FIX] Реализация Request части и фикс ServerWrapper

* [ANY] Обновление модулей
2019-03-22 13:14:29 +07:00

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
}
}