Skip to content

Fixed bugs #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions x64/auth.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ namespace KeyAuth {
class api {
public:

std::string name, ownerid, version, url, path;
std::string name, ownerid, version, url, path;
static bool debug;

api(std::string name, std::string ownerid, std::string version, std::string url, std::string path, bool debugParameter = false) {
api(std::string name, std::string ownerid, std::string version, std::string url, std::string path, bool debugParameter = false)
: name(name), ownerid(ownerid), version(version), url(url), path(path)
{
setDebug(debugParameter);
}

void ban(std::string reason = "");
void init();
void check(bool check_paid = false);
Expand All @@ -44,26 +46,26 @@ namespace KeyAuth {
void fetchstats();
void forgot(std::string username, std::string email);
void logout();

class subscriptions_class {
public:
std::string name;
std::string expiry;
};

class userdata {
public:

// user data
std::string username;
std::string ip;
std::string hwid;
std::string createdate;
std::string lastlogin;

std::vector<subscriptions_class> subscriptions;
};

class appdata {
public:
// app data
Expand All @@ -72,8 +74,9 @@ namespace KeyAuth {
std::string numKeys;
std::string version;
std::string customerPanelLink;
std::string downloadLink;
};

class responsedata {
public:
// response data
Expand All @@ -82,7 +85,7 @@ namespace KeyAuth {
std::string message;
bool isPaid{};
};

bool activate = false;
class Tfa {
public:
Expand All @@ -92,13 +95,14 @@ namespace KeyAuth {
private:
void QrCode();
};

Tfa& enable2fa(std::string code = "");
Tfa& disable2fa(std::string code = "");

userdata user_data;
appdata app_data;
responsedata response;
Tfa tfa;

private:
std::string sessionid, enckey;
Expand Down
Binary file modified x64/library_x64.lib
Binary file not shown.