forked from zombieb/undead-universal-patch-il2cpp
Move Galvanic support to different namespace
This commit is contained in:
@@ -79,11 +79,11 @@ namespace undead_universal_patch_il2cpp.Patches
|
|||||||
{
|
{
|
||||||
// refresh the token if it expired
|
// refresh the token if it expired
|
||||||
// this is somewhat inefficient, but we don't hook into many requests (see below) so it should be fine
|
// this is somewhat inefficient, but we don't hook into many requests (see below) so it should be fine
|
||||||
GalvanicWebAuth.TokenExpiry();
|
Galvanic.GalvanicWebAuth.TokenExpiry();
|
||||||
|
|
||||||
Type httpRequestType = request.GetType();
|
Type httpRequestType = request.GetType();
|
||||||
MethodInfo addHeaderMethod = httpRequestType.GetMethod("AddHeader");
|
MethodInfo addHeaderMethod = httpRequestType.GetMethod("AddHeader");
|
||||||
addHeaderMethod.Invoke(request, ["GalvanicAuth", GalvanicWebAuth.Token]);
|
addHeaderMethod.Invoke(request, ["GalvanicAuth", Galvanic.GalvanicWebAuth.Token]);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using System.IO;
|
|||||||
|
|
||||||
// this entire file could be better
|
// this entire file could be better
|
||||||
|
|
||||||
namespace undead_universal_patch_il2cpp
|
namespace undead_universal_patch_il2cpp.Galvanic
|
||||||
{
|
{
|
||||||
public class GalvanicAuth
|
public class GalvanicAuth
|
||||||
{
|
{
|
||||||
|
|||||||
11
Plugin.cs
11
Plugin.cs
@@ -1,4 +1,5 @@
|
|||||||
using BepInEx;
|
using AmplitudeAnalytics;
|
||||||
|
using BepInEx;
|
||||||
using BepInEx.Logging;
|
using BepInEx.Logging;
|
||||||
using BepInEx.Unity.IL2CPP;
|
using BepInEx.Unity.IL2CPP;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
@@ -65,10 +66,10 @@ public class Plugin : BasePlugin
|
|||||||
if (GalvanicConfig.RegenerateKeypair.Value)
|
if (GalvanicConfig.RegenerateKeypair.Value)
|
||||||
{
|
{
|
||||||
Log.LogInfo("Regenerating keypair");
|
Log.LogInfo("Regenerating keypair");
|
||||||
GalvanicAuth.PrepareKeys();
|
Galvanic.GalvanicAuth.PrepareKeys();
|
||||||
}
|
}
|
||||||
if (GalvanicConfig.Export.Value == "IWantToExportMyKeys") GalvanicAuth.Export();
|
if (GalvanicConfig.Export.Value == "IWantToExportMyKeys") Galvanic.GalvanicAuth.Export();
|
||||||
if (GalvanicConfig.Import.Value) GalvanicAuth.Import();
|
if (GalvanicConfig.Import.Value) Galvanic.GalvanicAuth.Import();
|
||||||
if (GalvanicConfig.Enabled.Value) GalvanicWebAuth.GetToken();
|
if (GalvanicConfig.Enabled.Value) Galvanic.GalvanicWebAuth.GetToken();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user