mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-04-16 21:30:15 +00:00
add username to auth packet
This commit is contained in:
@@ -17,6 +17,7 @@ namespace fs = std::filesystem;
|
||||
std::string PublicKey;
|
||||
std::string PrivateKey;
|
||||
extern bool LoginAuth;
|
||||
extern std::string Username;
|
||||
std::string Role;
|
||||
|
||||
void UpdateKey(const char* newKey){
|
||||
@@ -64,6 +65,9 @@ std::string Login(const std::string& fields){
|
||||
}
|
||||
if(d.contains("success") && d["success"].get<bool>()){
|
||||
LoginAuth = true;
|
||||
if (d.contains("username")) {
|
||||
Username = d["username"].get<std::string>();
|
||||
}
|
||||
if(!d.contains("private_key")) {
|
||||
UpdateKey(d["private_key"].get<std::string>().c_str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user