[FEATURE] feature support

This commit is contained in:
Gravit 2020-03-20 07:43:02 +07:00
parent eddfd61c06
commit 8875146be3
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
2 changed files with 24 additions and 0 deletions

View file

@ -40,12 +40,29 @@ public enum AuthType
OTHER
}
}
public enum ServerFeature
{
FEATURE_SUPPORT(1);
public final int val;
ServerFeature(int val) {
this.val = val;
}
}
@LauncherNetworkAPI
public final List<AuthAvailability> list;
@LauncherNetworkAPI
public final long features;
public GetAvailabilityAuthRequestEvent(List<AuthAvailability> list) {
this.list = list;
this.features = ServerFeature.FEATURE_SUPPORT.val;
}
public GetAvailabilityAuthRequestEvent(List<AuthAvailability> list, long features) {
this.list = list;
this.features = features;
}
@Override

View file

@ -49,6 +49,13 @@ public AuthRequest(String login, byte[] password) {
authType = ConnectTypes.CLIENT;
}
public AuthRequest(String login, byte[] password, String auth_id) {
this.login = VerifyHelper.verify(login, VerifyHelper.NOT_EMPTY, "Login can't be empty");
this.password = new AuthECPassword(password.clone());
this.auth_id = auth_id;
getSession = true;
authType = ConnectTypes.CLIENT;
}
@Deprecated
public AuthRequest(String login, byte[] password, HWID hwid, String auth_id) {
this.login = VerifyHelper.verify(login, VerifyHelper.NOT_EMPTY, "Login can't be empty");