network, yuzu: Improve variable naming and style consistency
This commit is contained in:
parent
6b5667dfa5
commit
6a2dcc8b3d
14 changed files with 53 additions and 47 deletions
|
@ -54,7 +54,7 @@ static void to_json(nlohmann::json& json, const Room& room) {
|
|||
}
|
||||
|
||||
static void from_json(const nlohmann::json& json, Room& room) {
|
||||
room.verify_UID = json.at("externalGuid").get<std::string>();
|
||||
room.verify_uid = json.at("externalGuid").get<std::string>();
|
||||
room.ip = json.at("address").get<std::string>();
|
||||
room.information.name = json.at("name").get<std::string>();
|
||||
try {
|
||||
|
@ -116,7 +116,7 @@ WebService::WebResult RoomJson::Register() {
|
|||
auto reply_json = nlohmann::json::parse(result.returned_data);
|
||||
room = reply_json.get<AnnounceMultiplayerRoom::Room>();
|
||||
room_id = reply_json.at("id").get<std::string>();
|
||||
return WebService::WebResult{WebService::WebResult::Code::Success, "", room.verify_UID};
|
||||
return WebService::WebResult{WebService::WebResult::Code::Success, "", room.verify_uid};
|
||||
}
|
||||
|
||||
void RoomJson::ClearPlayers() {
|
||||
|
|
|
@ -35,9 +35,9 @@ std::string GetPublicKey(const std::string& host) {
|
|||
|
||||
VerifyUserJWT::VerifyUserJWT(const std::string& host) : pub_key(GetPublicKey(host)) {}
|
||||
|
||||
Network::VerifyUser::UserData VerifyUserJWT::LoadUserData(const std::string& verify_UID,
|
||||
Network::VerifyUser::UserData VerifyUserJWT::LoadUserData(const std::string& verify_uid,
|
||||
const std::string& token) {
|
||||
const std::string audience = fmt::format("external-{}", verify_UID);
|
||||
const std::string audience = fmt::format("external-{}", verify_uid);
|
||||
using namespace jwt::params;
|
||||
std::error_code error;
|
||||
auto decoded =
|
||||
|
|
|
@ -17,7 +17,7 @@ public:
|
|||
VerifyUserJWT(const std::string& host);
|
||||
~VerifyUserJWT() = default;
|
||||
|
||||
Network::VerifyUser::UserData LoadUserData(const std::string& verify_UID,
|
||||
Network::VerifyUser::UserData LoadUserData(const std::string& verify_uid,
|
||||
const std::string& token) override;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue