mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-12-22 16:48:25 +01:00
Fixup jsonwebtoken compat injections
Closes https://github.com/ViaVersion/ViaFabricPlus/issues/437
This commit is contained in:
parent
8c34100ee1
commit
aa27837c56
@ -26,7 +26,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
/*
|
||||
* JsonWebToken is used by MinecraftAuth and since it's using Java services, it's not working with the fabric loader
|
||||
* JsonWebToken is used by MinecraftAuth, and since it's using Java services, it's not working with the fabric loader,
|
||||
* So we have to change all services usages by using the normal Java API
|
||||
*/
|
||||
@Mixin(value = Classes.class, remap = false)
|
||||
|
@ -26,13 +26,13 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
/*
|
||||
* JsonWebToken is used by MinecraftAuth and since it's using Java services, it's not working with the fabric loader
|
||||
* JsonWebToken is used by MinecraftAuth, and since it's using Java services, it's not working with the fabric loader,
|
||||
* So we have to change all services usages by using the normal Java API
|
||||
*/
|
||||
@Mixin(value = DefaultJwtParserBuilder.class, remap = false)
|
||||
public abstract class MixinDefaultJwtParserBuilder {
|
||||
|
||||
@Redirect(method = "build()Lio/jsonwebtoken/JwtParser;", at = @At(value = "INVOKE", target = "Lio/jsonwebtoken/impl/lang/Services;get(Ljava/lang/Class;)Ljava/lang/Object;"))
|
||||
@Redirect(method = "build()Lio/jsonwebtoken/JwtParser;", at = @At(value = "INVOKE", target = "Lio/jsonwebtoken/impl/lang/Services;loadFirst(Ljava/lang/Class;)Ljava/lang/Object;"))
|
||||
public Object removeServicesSupport(Class<?> spi) {
|
||||
return new GsonDeserializer<>();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user