mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-11-04 09:19:33 +01:00
Deleted useless code.
This commit is contained in:
parent
f88407f0bd
commit
8c7ece3004
@ -1,13 +1,12 @@
|
|||||||
package de.florianmichael.viafabricplus.definition.authlib;
|
package de.florianmichael.viafabricplus.definition.authlib;
|
||||||
|
|
||||||
|
import com.mojang.authlib.yggdrasil.response.KeyPairResponse;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This library is part of the AuthLib, we are overwriting this class to add a new field.
|
This library is part of the AuthLib, we are overwriting this class to add a new field.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public record KeyPairResponseBypass(KeyPair keyPair, ByteBuffer publicKeySignatureV2, ByteBuffer publicKeySignature /* own field */, String expiresAt, String refreshedAfter) {
|
public record KeyPairResponseBypass(KeyPairResponse.KeyPair keyPair, ByteBuffer publicKeySignatureV2, ByteBuffer publicKeySignature /* own field */, String expiresAt, String refreshedAfter) {
|
||||||
|
|
||||||
public record KeyPair(String privateKey, String publicKey) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -47,13 +47,7 @@ public class MixinYggdrasilUserApiService {
|
|||||||
final var response = minecraftClient.post(routeKeyPair, KeyPairResponseBypass.class);
|
final var response = minecraftClient.post(routeKeyPair, KeyPairResponseBypass.class);
|
||||||
if (response == null) return;
|
if (response == null) return;
|
||||||
|
|
||||||
final var keyPair = response.keyPair();
|
final var returnValue = new KeyPairResponse(response.keyPair(), response.publicKeySignatureV2(), response.expiresAt(), response.refreshedAfter());
|
||||||
final var returnValue = new KeyPairResponse(
|
|
||||||
keyPair == null ? null : new KeyPairResponse.KeyPair(keyPair.privateKey(), keyPair.publicKey()),
|
|
||||||
response.publicKeySignatureV2(),
|
|
||||||
response.expiresAt(),
|
|
||||||
response.refreshedAfter()
|
|
||||||
);
|
|
||||||
((IKeyPairResponse) (Object) returnValue).viafabricplus_setLegacyPublicKeySignature(response.publicKeySignature());
|
((IKeyPairResponse) (Object) returnValue).viafabricplus_setLegacyPublicKeySignature(response.publicKeySignature());
|
||||||
|
|
||||||
cir.setReturnValue(returnValue);
|
cir.setReturnValue(returnValue);
|
||||||
|
Loading…
Reference in New Issue
Block a user