[FIX] Deprecate RestoreSession

This commit is contained in:
Gravita 2022-03-17 21:27:08 +07:00
parent 62094e0cf6
commit 6086b15c9f
3 changed files with 5 additions and 0 deletions

View file

@ -36,6 +36,9 @@ public static JwtTokenInfo getJwtInfoFromAccessToken(String token, ECPublicKey p
} }
public static String makeRefreshTokenFromPassword(String username, String rawPassword, String secretSalt) { public static String makeRefreshTokenFromPassword(String username, String rawPassword, String secretSalt) {
if(rawPassword == null) {
rawPassword = "";
}
return SecurityHelper.toHex(SecurityHelper.digest(SecurityHelper.DigestAlgorithm.SHA256, return SecurityHelper.toHex(SecurityHelper.digest(SecurityHelper.DigestAlgorithm.SHA256,
String.format("%s.%s.%s.%s", secretSalt, username, rawPassword, secretSalt))); String.format("%s.%s.%s.%s", secretSalt, username, rawPassword, secretSalt)));
} }

View file

@ -2,6 +2,7 @@
import pro.gravit.launcher.events.RequestEvent; import pro.gravit.launcher.events.RequestEvent;
@Deprecated
public class RestoreSessionRequestEvent extends RequestEvent { public class RestoreSessionRequestEvent extends RequestEvent {
public CurrentUserRequestEvent.UserInfo userInfo; public CurrentUserRequestEvent.UserInfo userInfo;

View file

@ -7,6 +7,7 @@
import java.util.UUID; import java.util.UUID;
@Deprecated
public class RestoreSessionRequest extends Request<RestoreSessionRequestEvent> implements WebSocketRequest { public class RestoreSessionRequest extends Request<RestoreSessionRequestEvent> implements WebSocketRequest {
@LauncherNetworkAPI @LauncherNetworkAPI
public final UUID session; public final UUID session;