aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/serverauthentication.h
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/serverauthentication.h')
-rw-r--r--NorthstarDedicatedTest/serverauthentication.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/serverauthentication.h b/NorthstarDedicatedTest/serverauthentication.h
new file mode 100644
index 00000000..75187221
--- /dev/null
+++ b/NorthstarDedicatedTest/serverauthentication.h
@@ -0,0 +1,28 @@
+#pragma once
+#include <unordered_map>
+#include <string>
+
+struct AuthData
+{
+ char* uid;
+
+ // pdata
+ char* pdata;
+ size_t pdataSize;
+};
+
+class ServerAuthenticationManager
+{
+public:
+ std::unordered_map<std::string, AuthData*> m_authData;
+
+public:
+ ServerAuthenticationManager();
+ void AddPlayerAuth(char* authToken, char* uid, char* pdata, size_t pdataSize);
+ bool AuthenticatePlayer(__int64 player, char* authToken);
+ void WritePersistentData(void* player);
+};
+
+void InitialiseServerAuthentication(HMODULE baseAddress);
+
+extern ServerAuthenticationManager* g_ServerAuthenticationManager; \ No newline at end of file