-
Notifications
You must be signed in to change notification settings - Fork 0
/
auth.hpp
76 lines (66 loc) · 1.99 KB
/
auth.hpp
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#include <Windows.h>
#include <iostream>
#include <vector>
#include <fstream>
struct channel_struct
{
std::string author;
std::string message;
std::string timestamp;
};
namespace KeyAuth {
class api {
public:
std::string name, ownerid, secret, version, url;
api(std::string name, std::string ownerid, std::string secret, std::string version, std::string url) : name(name), ownerid(ownerid), secret(secret), version(version), url(url) {}
void ban(std::string reason = "");
void init();
void check();
void log(std::string msg);
void license(std::string key);
std::string var(std::string varid);
std::string webhook(std::string id, std::string params, std::string body = "", std::string contenttype = "");
void setvar(std::string var, std::string vardata);
std::string getvar(std::string var);
bool checkblack();
void web_login();
void button(std::string value);
void upgrade(std::string username, std::string key);
void login(std::string username, std::string password);
std::vector<unsigned char> download(std::string fileid);
void regstr(std::string username, std::string password, std::string key, std::string email = "");
void chatget(std::string channel);
bool chatsend(std::string message, std::string channel);
void changeusername(std::string newusername);
std::string fetchonline();
void forgot(std::string username, std::string email);
class subscriptions_class {
public:
std::string name;
std::string expiry;
};
class data_class {
public:
// app data
std::string numUsers;
std::string numOnlineUsers;
std::string numKeys;
std::string version;
std::string customerPanelLink;
// user data
std::string username;
std::string ip;
std::string hwid;
std::string createdate;
std::string lastlogin;
std::vector<subscriptions_class> subscriptions;
// response data
std::vector<channel_struct> channeldata;
bool success;
std::string message;
};
data_class data;
private:
std::string sessionid, enckey;
};
}