Refactoring Claims, add Server Side Messaging (#33)

* cache JWT by ApiUri, CharaIdent, SecretKey, refactor auth flow to new api

* add server side message handling

* update client to mainline api

Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
This commit is contained in:
rootdarkarchon
2023-01-04 15:53:27 +01:00
committed by GitHub
parent 2404dc3f94
commit 9f5b4c189e
8 changed files with 92 additions and 36 deletions

View File

@@ -30,12 +30,24 @@ internal class Logger : ILogger
}
}
public static void Error(string msg, Exception ex)
{
var caller = new StackTrace().GetFrame(1)?.GetMethod()?.ReflectedType?.Name ?? "Unknown";
PluginLog.Error($"[{caller}] {msg} {Environment.NewLine} Exception: {ex.Message} {Environment.NewLine} {ex.StackTrace}");
}
public static void Warn(string msg, Exception ex)
{
var caller = new StackTrace().GetFrame(1)?.GetMethod()?.ReflectedType?.Name ?? "Unknown";
PluginLog.Warning($"[{caller}] {msg} {Environment.NewLine} Exception: {ex.Message} {Environment.NewLine} {ex.StackTrace}");
}
public static void Error(string msg)
{
var caller = new StackTrace().GetFrame(1)?.GetMethod()?.ReflectedType?.Name ?? "Unknown";
PluginLog.Error($"[{caller}] {msg}");
}
public static void Warn(string warn)
{
var caller = new StackTrace().GetFrame(1)?.GetMethod()?.ReflectedType?.Name ?? "Unknown";