@@ -75,9 +75,9 @@ You must call this function prior to using any other KeyAuth function. Otherwise
75
75
76
76
```cpp
77
77
KeyAuthApp.init();
78
- if (!KeyAuthApp.data .success)
78
+ if (!KeyAuthApp.response .success)
79
79
{
80
- std::cout << skCrypt("\n Status: ") << KeyAuthApp.data .message;
80
+ std::cout << skCrypt("\n Status: ") << KeyAuthApp.response .message;
81
81
Sleep(1500);
82
82
exit(0);
83
83
}
@@ -87,11 +87,11 @@ if (!KeyAuthApp.data.success)
87
87
88
88
``` cpp
89
89
KeyAuthApp.fetchstats();
90
- std::cout << skCrypt(" \n\n Number of users: " ) << KeyAuthApp.data .numUsers;
91
- std::cout << skCrypt(" \n Number of online users: " ) << KeyAuthApp.data .numOnlineUsers;
92
- std::cout << skCrypt(" \n Number of keys: " ) << KeyAuthApp.data .numKeys;
93
- std::cout << skCrypt(" \n Application Version: " ) << KeyAuthApp.data .version;
94
- std::cout << skCrypt(" \n Customer panel link: " ) << KeyAuthApp.data .customerPanelLink;
90
+ std::cout << skCrypt(" \n\n Number of users: " ) << KeyAuthApp.app_data .numUsers;
91
+ std::cout << skCrypt(" \n Number of online users: " ) << KeyAuthApp.app_data .numOnlineUsers;
92
+ std::cout << skCrypt(" \n Number of keys: " ) << KeyAuthApp.app_data .numKeys;
93
+ std::cout << skCrypt(" \n Application Version: " ) << KeyAuthApp.app_data .version;
94
+ std::cout << skCrypt(" \n Customer panel link: " ) << KeyAuthApp.app_data .customerPanelLink;
95
95
```
96
96
97
97
## ** Check session validation**
@@ -101,7 +101,7 @@ Use this to see if the user is logged in or not.
101
101
``` cpp
102
102
std::cout << skCrypt(" \n Checking session validation status (remove this if causing your loader to be slow)" );
103
103
KeyAuthApp.check();
104
- std::cout << skCrypt(" \n Current Session Validation Status: " ) << KeyAuthApp.data .message;
104
+ std::cout << skCrypt(" \n Current Session Validation Status: " ) << KeyAuthApp.response .message;
105
105
```
106
106
107
107
## ** Check blacklist status**
@@ -124,9 +124,9 @@ std::cin >> username;
124
124
std::cout << skCrypt(" \n Enter password: " );
125
125
std::cin >> password;
126
126
KeyAuthApp.login(username, password);
127
- if (!KeyAuthApp.data .success)
127
+ if (!KeyAuthApp.response .success)
128
128
{
129
- std::cout << skCrypt("\n Status: ") << KeyAuthApp.data .message;
129
+ std::cout << skCrypt("\n Status: ") << KeyAuthApp.response .message;
130
130
Sleep (1500);
131
131
exit(0);
132
132
}
@@ -145,9 +145,9 @@ std::cin >> password;
145
145
std::cout << skCrypt(" \n Enter license: " );
146
146
std::cin >> key;
147
147
KeyAuthApp.regstr(username, password, key);
148
- if (!KeyAuthApp.data .success)
148
+ if (!KeyAuthApp.response .success)
149
149
{
150
- std::cout << skCrypt("\n Status: ") << KeyAuthApp.data .message;
150
+ std::cout << skCrypt("\n Status: ") << KeyAuthApp.response .message;
151
151
Sleep (1500);
152
152
exit(0);
153
153
}
@@ -180,9 +180,9 @@ std::string key;
180
180
std::cout << skCrypt(" \n Enter license: " );
181
181
std::cin >> key;
182
182
KeyAuthApp.license(key);
183
- if (!KeyAuthApp.data .success)
183
+ if (!KeyAuthApp.response .success)
184
184
{
185
- std::cout << skCrypt("\n Status: ") << KeyAuthApp.data .message;
185
+ std::cout << skCrypt("\n Status: ") << KeyAuthApp.response .message;
186
186
Sleep (1500);
187
187
exit(0);
188
188
}
@@ -205,24 +205,24 @@ Show information for current logged-in user.
205
205
206
206
``` cpp
207
207
std::cout << skCrypt(" \n User data:" );
208
- std::cout << skCrypt(" \n Username: " ) << KeyAuthApp.data .username;
209
- std::cout << skCrypt(" \n IP address: " ) << KeyAuthApp.data .ip;
210
- std::cout << skCrypt(" \n Hardware-Id: " ) << KeyAuthApp.data .hwid;
211
- std::cout << skCrypt(" \n Create date: " ) << tm_to_readable_time(timet_to_tm(string_to_timet(KeyAuthApp.data .createdate)));
212
- std::cout << skCrypt(" \n Last login: " ) << tm_to_readable_time(timet_to_tm(string_to_timet(KeyAuthApp.data .lastlogin)));
208
+ std::cout << skCrypt(" \n Username: " ) << KeyAuthApp.response .username;
209
+ std::cout << skCrypt(" \n IP address: " ) << KeyAuthApp.user_data .ip;
210
+ std::cout << skCrypt(" \n Hardware-Id: " ) << KeyAuthApp.user_data .hwid;
211
+ std::cout << skCrypt(" \n Create date: " ) << tm_to_readable_time(timet_to_tm(string_to_timet(KeyAuthApp.user_data .createdate)));
212
+ std::cout << skCrypt(" \n Last login: " ) << tm_to_readable_time(timet_to_tm(string_to_timet(KeyAuthApp.user_data .lastlogin)));
213
213
std::cout << skCrypt(" \n Subscription name(s): " );
214
214
std::string subs;
215
- for (std::string value : KeyAuthApp.data .subscriptions)subs += value + " " ;
215
+ for (std::string value : KeyAuthApp.user_data .subscriptions)subs += value + " " ;
216
216
std::cout << subs;
217
- std::cout << skCrypt(" \n Subscription expiry: " ) << tm_to_readable_time(timet_to_tm(string_to_timet(KeyAuthApp.data .expiry)));
217
+ std::cout << skCrypt(" \n Subscription expiry: " ) << tm_to_readable_time(timet_to_tm(string_to_timet(KeyAuthApp.user_data .expiry)));
218
218
```
219
219
220
220
## ** Check subscription name of user**
221
221
222
222
If you want to wall off parts of your app to only certain users, you can have multiple subscriptions with different names. Then, when you create licenses that correspond to the level of that subscription, users who use those licenses will get a subscription with the name of the subscription that corresponds to the level of the license key they used.
223
223
224
224
``` cpp
225
- for (std::string subs : KeyAuthApp.data .subscriptions)
225
+ for (std::string subs : KeyAuthApp.user_data .subscriptions)
226
226
{
227
227
if (subs == "default")
228
228
{
@@ -297,9 +297,9 @@ Send HTTP requests to URLs securely without leaking the URL in your application.
297
297
298
298
``` cpp
299
299
std::string resp = KeyAuthApp.webhook(" Sh1j25S5iX" , " &mak=best&debug=1" );
300
- if (!KeyAuthApp.data .success) // check whether webhook request sent correctly
300
+ if (!KeyAuthApp.response .success) // check whether webhook request sent correctly
301
301
{
302
- std::cout << skCrypt("\n\n Status: ") << KeyAuthApp.data .message;
302
+ std::cout << skCrypt("\n\n Status: ") << KeyAuthApp.response .message;
303
303
Sleep (1500);
304
304
exit(0);
305
305
}
@@ -318,9 +318,9 @@ Keep files secure by providing KeyAuth your file download link on the KeyAuth da
318
318
``` cpp
319
319
// remember, certain paths like windows folder will require you to turn on auto run as admin https://stackoverflow.com/a/19617989
320
320
std::vector<std::uint8_t > bytes = KeyAuthApp.download(" 362906" );
321
- if (!KeyAuthApp.data .success) // check whether file downloaded correctly
321
+ if (!KeyAuthApp.response .success) // check whether file downloaded correctly
322
322
{
323
- std::cout << skCrypt("\n\n Status: ") << KeyAuthApp.data .message;
323
+ std::cout << skCrypt("\n\n Status: ") << KeyAuthApp.response .message;
324
324
Sleep (1500);
325
325
exit(0);
326
326
}
@@ -335,9 +335,9 @@ Allow users to communicate amongst themselves in your program.
335
335
336
336
```cpp
337
337
KeyAuthApp.chatget("test");
338
- for (int i = 0; i < KeyAuthApp.data .channeldata.size(); i++)
338
+ for (int i = 0; i < KeyAuthApp.response .channeldata.size(); i++)
339
339
{
340
- std::cout << "\n Author:" + KeyAuthApp.data .channeldata[i].author + " | Message:" + KeyAuthApp.data .channeldata[i].message + " | Send Time:" + tm_to_readable_time(timet_to_tm(string_to_timet(KeyAuthApp.data .channeldata[i].timestamp)));
340
+ std::cout << "\n Author:" + KeyAuthApp.user_data .channeldata[i].author + " | Message:" + KeyAuthApp.user_data .channeldata[i].message + " | Send Time:" + tm_to_readable_time(timet_to_tm(string_to_timet(KeyAuthApp.user_data .channeldata[i].timestamp)));
341
341
}
342
342
```
343
343
@@ -347,7 +347,7 @@ std::string message;
347
347
std::getline (std::cin, message);
348
348
if (!KeyAuthApp.chatsend("test", message))
349
349
{
350
- std::cout << KeyAuthApp.data .message << std::endl;
350
+ std::cout << KeyAuthApp.response .message << std::endl;
351
351
}
352
352
```
353
353
@@ -362,8 +362,8 @@ std::cout << skCrypt("\n Change Username To: ");
362
362
std::string newusername;
363
363
std::cin >> newusername;
364
364
KeyAuthApp.changeusername(newusername);
365
- if (KeyAuthApp.data .success)
365
+ if (KeyAuthApp.response .success)
366
366
{
367
- std::cout << KeyAuthApp.data .message << std::endl;
367
+ std::cout << KeyAuthApp.response .message << std::endl;
368
368
}
369
369
```
0 commit comments