mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-27 12:27:17 +00:00
[Loginserver] Modernize codebase (#4647)
* Beginning of cleanup * More cleanup * More cleanup * Enc cleanup * client manager cleanup * client cleanup * More cleanup * More cleanup * Cleanup * More cleanup, account context, account management * Remove positional fmt bindings * Use LoginAccountContext * Update loginserver_webserver.cpp * Remove comments * Port CreateLoginServerAccount to repositories * More cleanup * More cleanup * More cleanup * More cleanup * Remove a ton of functions * More cleanup * More cleanup * More cleanup * Cleanup SendClientAuthToWorld * Consolidate world server logic * Update login_accounts_repository.h * Update login_accounts_repository.h * Move api tokens to repositories * Cleanup options * Move everything else to repositories * Update account_management.cpp * uint64 account * Update login_schema.sql * Fix * Update world_server.cpp * auto
This commit is contained in:
@@ -3,32 +3,22 @@
|
||||
|
||||
#include "iostream"
|
||||
#include "../common/types.h"
|
||||
#include "login_types.h"
|
||||
#include "encryption.h"
|
||||
#include "login_server.h"
|
||||
|
||||
extern LoginServer server;
|
||||
extern Database database;
|
||||
|
||||
class AccountManagement {
|
||||
public:
|
||||
static uint64 CreateLoginServerAccount(LoginAccountContext c);
|
||||
static uint64 CheckLoginserverUserCredentials(LoginAccountContext c);
|
||||
static bool UpdateLoginserverUserCredentials(LoginAccountContext c);
|
||||
static uint64 CheckExternalLoginserverUserCredentials(LoginAccountContext c);
|
||||
static bool UpdateLoginserverWorldAdminAccountPasswordByName(LoginAccountContext c);
|
||||
static uint64 HealthCheckUserLogin();
|
||||
|
||||
/**
|
||||
* @param username
|
||||
* @param password
|
||||
* @param email
|
||||
* @param source_loginserver
|
||||
* @param login_account_id
|
||||
* @return
|
||||
*/
|
||||
static int32 CreateLoginServerAccount(
|
||||
std::string username,
|
||||
std::string password,
|
||||
std::string email = "",
|
||||
const std::string &source_loginserver = "local",
|
||||
uint32 login_account_id = 0
|
||||
);
|
||||
|
||||
/**
|
||||
* @param username
|
||||
* @param password
|
||||
* @param email
|
||||
* @return
|
||||
*/
|
||||
static bool CreateLoginserverWorldAdminAccount(
|
||||
const std::string &username,
|
||||
const std::string &password,
|
||||
@@ -37,50 +27,6 @@ public:
|
||||
const std::string &last_name = "",
|
||||
const std::string &ip_address = ""
|
||||
);
|
||||
|
||||
/**
|
||||
* @param in_account_username
|
||||
* @param in_account_password
|
||||
* @return
|
||||
*/
|
||||
static uint32 CheckLoginserverUserCredentials(
|
||||
const std::string &in_account_username,
|
||||
const std::string &in_account_password,
|
||||
const std::string &source_loginserver = "local"
|
||||
);
|
||||
|
||||
/**
|
||||
* @param in_account_username
|
||||
* @param in_account_password
|
||||
* @return
|
||||
*/
|
||||
static bool UpdateLoginserverUserCredentials(
|
||||
const std::string &in_account_username,
|
||||
const std::string &in_account_password,
|
||||
const std::string &source_loginserver = "local"
|
||||
);
|
||||
|
||||
/**
|
||||
* @param in_account_username
|
||||
* @param in_account_password
|
||||
* @return
|
||||
*/
|
||||
static uint32 CheckExternalLoginserverUserCredentials(
|
||||
const std::string &in_account_username,
|
||||
const std::string &in_account_password
|
||||
);
|
||||
|
||||
/**
|
||||
* @param in_account_username
|
||||
* @param in_account_password
|
||||
* @return
|
||||
*/
|
||||
static bool UpdateLoginserverWorldAdminAccountPasswordByName(
|
||||
const std::string &in_account_username,
|
||||
const std::string &in_account_password
|
||||
);
|
||||
|
||||
static uint32 HealthCheckUserLogin();
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user