mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-10 04:40:05 +00:00
web_service: Change authentication system to use JWT (#4041)
* Change authentication system to JWT * Address review comments * Get rid of global variable, fix some documentations, fix a bug when verificating * Refactor PostJson to avoid code duplication * Rename jwt_token, add functionality to request a new JWT when getting a 401 * Take bools by value instead of const reference * Send request again when JWT is invalid and use forward declarations * Omit brackets
This commit is contained in:
parent
b49d042200
commit
604c1b5fc3
6 changed files with 202 additions and 85 deletions
|
@ -26,7 +26,8 @@ std::future<bool> VerifyLogin(std::string& username, std::string& token,
|
|||
|
||||
return username == *iter;
|
||||
};
|
||||
return GetJson<bool>(get_func, endpoint_url, false, username, token);
|
||||
UpdateCoreJWT(true, username, token);
|
||||
return GetJson<bool>(get_func, endpoint_url, false);
|
||||
}
|
||||
|
||||
} // namespace WebService
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue