2018-09-17 10:07:32 +03:00
|
|
|
package ru.gravit.launchserver.socket;
|
|
|
|
|
2018-09-27 00:18:26 +03:00
|
|
|
import ru.gravit.launcher.profiles.ClientProfile;
|
2018-10-01 13:08:16 +03:00
|
|
|
import ru.gravit.launchserver.auth.ClientPermissions;
|
2018-09-27 00:18:26 +03:00
|
|
|
|
2018-09-17 10:07:32 +03:00
|
|
|
public class Client {
|
|
|
|
public long session;
|
|
|
|
|
|
|
|
public long timestamp;
|
2018-09-27 00:18:26 +03:00
|
|
|
public Type type;
|
|
|
|
public ClientProfile profile;
|
|
|
|
public boolean isAuth;
|
2018-10-25 15:36:57 +03:00
|
|
|
public boolean checkSign;
|
2018-10-01 13:08:16 +03:00
|
|
|
public ClientPermissions permissions;
|
2018-10-07 10:17:37 +03:00
|
|
|
public String username;
|
2018-09-22 17:33:00 +03:00
|
|
|
|
2018-09-17 10:07:32 +03:00
|
|
|
public Client(long session) {
|
|
|
|
this.session = session;
|
|
|
|
timestamp = System.currentTimeMillis();
|
2018-09-27 00:18:26 +03:00
|
|
|
type = Type.USER;
|
|
|
|
isAuth = false;
|
2018-10-01 13:08:16 +03:00
|
|
|
permissions = ClientPermissions.DEFAULT;
|
2018-10-07 10:17:37 +03:00
|
|
|
username = "";
|
2018-10-25 15:36:57 +03:00
|
|
|
checkSign = false;
|
2018-09-17 10:07:32 +03:00
|
|
|
}
|
2018-09-27 00:18:26 +03:00
|
|
|
//Данные ваторизации
|
2018-09-17 10:07:32 +03:00
|
|
|
public void up() {
|
|
|
|
timestamp = System.currentTimeMillis();
|
|
|
|
}
|
2018-09-27 00:18:26 +03:00
|
|
|
public enum Type
|
|
|
|
{
|
|
|
|
SERVER,
|
|
|
|
USER
|
|
|
|
}
|
2018-09-17 10:07:32 +03:00
|
|
|
}
|