aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/serverauthentication.h
blob: 751872210f8a3449e0d5c94e9a755c8eb5ed3944 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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;