summaryrefslogtreecommitdiff
path: root/src/web_service
diff options
context:
space:
mode:
authorGravatar FearlessTobi2022-07-25 17:08:20 +0200
committerGravatar FearlessTobi2022-07-25 21:59:31 +0200
commit6a2dcc8b3d4ed0940e33d60fee701bcdb063eb6b (patch)
treeb70962e3698930c5b06d777bd912caa89a912391 /src/web_service
parentyuzu_cmd: Fix compilation (diff)
downloadyuzu-6a2dcc8b3d4ed0940e33d60fee701bcdb063eb6b.tar.gz
yuzu-6a2dcc8b3d4ed0940e33d60fee701bcdb063eb6b.tar.xz
yuzu-6a2dcc8b3d4ed0940e33d60fee701bcdb063eb6b.zip
network, yuzu: Improve variable naming and style consistency
Diffstat (limited to 'src/web_service')
-rw-r--r--src/web_service/announce_room_json.cpp4
-rw-r--r--src/web_service/verify_user_jwt.cpp4
-rw-r--r--src/web_service/verify_user_jwt.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/web_service/announce_room_json.cpp b/src/web_service/announce_room_json.cpp
index 082bebaa9..0aae8e215 100644
--- a/src/web_service/announce_room_json.cpp
+++ b/src/web_service/announce_room_json.cpp
@@ -54,7 +54,7 @@ static void to_json(nlohmann::json& json, const Room& room) {
54} 54}
55 55
56static void from_json(const nlohmann::json& json, Room& room) { 56static void from_json(const nlohmann::json& json, Room& room) {
57 room.verify_UID = json.at("externalGuid").get<std::string>(); 57 room.verify_uid = json.at("externalGuid").get<std::string>();
58 room.ip = json.at("address").get<std::string>(); 58 room.ip = json.at("address").get<std::string>();
59 room.information.name = json.at("name").get<std::string>(); 59 room.information.name = json.at("name").get<std::string>();
60 try { 60 try {
@@ -116,7 +116,7 @@ WebService::WebResult RoomJson::Register() {
116 auto reply_json = nlohmann::json::parse(result.returned_data); 116 auto reply_json = nlohmann::json::parse(result.returned_data);
117 room = reply_json.get<AnnounceMultiplayerRoom::Room>(); 117 room = reply_json.get<AnnounceMultiplayerRoom::Room>();
118 room_id = reply_json.at("id").get<std::string>(); 118 room_id = reply_json.at("id").get<std::string>();
119 return WebService::WebResult{WebService::WebResult::Code::Success, "", room.verify_UID}; 119 return WebService::WebResult{WebService::WebResult::Code::Success, "", room.verify_uid};
120} 120}
121 121
122void RoomJson::ClearPlayers() { 122void RoomJson::ClearPlayers() {
diff --git a/src/web_service/verify_user_jwt.cpp b/src/web_service/verify_user_jwt.cpp
index 3133dcbe2..2f294d378 100644
--- a/src/web_service/verify_user_jwt.cpp
+++ b/src/web_service/verify_user_jwt.cpp
@@ -35,9 +35,9 @@ std::string GetPublicKey(const std::string& host) {
35 35
36VerifyUserJWT::VerifyUserJWT(const std::string& host) : pub_key(GetPublicKey(host)) {} 36VerifyUserJWT::VerifyUserJWT(const std::string& host) : pub_key(GetPublicKey(host)) {}
37 37
38Network::VerifyUser::UserData VerifyUserJWT::LoadUserData(const std::string& verify_UID, 38Network::VerifyUser::UserData VerifyUserJWT::LoadUserData(const std::string& verify_uid,
39 const std::string& token) { 39 const std::string& token) {
40 const std::string audience = fmt::format("external-{}", verify_UID); 40 const std::string audience = fmt::format("external-{}", verify_uid);
41 using namespace jwt::params; 41 using namespace jwt::params;
42 std::error_code error; 42 std::error_code error;
43 auto decoded = 43 auto decoded =
diff --git a/src/web_service/verify_user_jwt.h b/src/web_service/verify_user_jwt.h
index 6db74c208..ec3cc2904 100644
--- a/src/web_service/verify_user_jwt.h
+++ b/src/web_service/verify_user_jwt.h
@@ -17,7 +17,7 @@ public:
17 VerifyUserJWT(const std::string& host); 17 VerifyUserJWT(const std::string& host);
18 ~VerifyUserJWT() = default; 18 ~VerifyUserJWT() = default;
19 19
20 Network::VerifyUser::UserData LoadUserData(const std::string& verify_UID, 20 Network::VerifyUser::UserData LoadUserData(const std::string& verify_uid,
21 const std::string& token) override; 21 const std::string& token) override;
22 22
23private: 23private: