Add token expiry (bump minor)
Temp remove genuine patch for unity product name Exporting and importing tokens (not tested very well) Insecure HTTP warning on auth
This commit is contained in:
@@ -77,6 +77,10 @@ namespace undead_universal_patch_il2cpp.Patches
|
||||
{
|
||||
if (newUri.PathAndQuery.Contains(header))
|
||||
{
|
||||
// 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
|
||||
GalvanicWebAuth.TokenExpiry();
|
||||
|
||||
Type httpRequestType = request.GetType();
|
||||
MethodInfo addHeaderMethod = httpRequestType.GetMethod("AddHeader");
|
||||
addHeaderMethod.Invoke(request, ["GalvanicAuth", GalvanicWebAuth.Token]);
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
using HarmonyLib;
|
||||
using System.Reflection;
|
||||
|
||||
namespace undead_universal_patch_il2cpp.Patches
|
||||
{
|
||||
[HarmonyPatch]
|
||||
class GenuinePatch
|
||||
{
|
||||
static readonly MethodInfo methodType = AccessTools.Method(AccessTools.TypeByName("Application"), "get_productName");
|
||||
static bool Prepare()
|
||||
{
|
||||
if (methodType == null) return false;
|
||||
else return true;
|
||||
}
|
||||
static MethodBase TargetMethod() => methodType;
|
||||
static void Prefix(ref string __result)
|
||||
{
|
||||
__result = string.Format("{0} (Custom Server)", __result);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
using HarmonyLib;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Reflection;
|
||||
|
||||
namespace undead_universal_patch_il2cpp.Patches
|
||||
|
||||
Reference in New Issue
Block a user