Send Token Over Header
This commit is contained in:
1 parent
7f72bf5549
commit
a9e98d3c03
2 files changed
+4
-2
No files matched your search
@@ -658,9 +658,10 @@ std::vector<std::string> split(const std::string& str, char delimiter) {
|
|||||||
|
|
||||||
int Windows64Launcher::API_GetAccountInfo(const std::string token) {
|
int Windows64Launcher::API_GetAccountInfo(const std::string token) {
|
||||||
std::vector<std::wstring> headers;
|
std::vector<std::wstring> headers;
|
||||||
|
headers.push_back(L"Authorization: " + token);
|
||||||
headers.push_back(L"Content-Type: text/plain");
|
headers.push_back(L"Content-Type: text/plain");
|
||||||
|
|
||||||
HttpResponse response = WinsockNetLayer::DoWinHttpRequest(g_Win64AuthURL, L"/accountinfo", L"POST", token, headers);
|
HttpResponse response = WinsockNetLayer::DoWinHttpRequest(g_Win64AuthURL, L"/accountinfo", L"POST", "", headers);
|
||||||
|
|
||||||
if (response.status == 0) return -1;
|
if (response.status == 0) return -1;
|
||||||
|
|
||||||
|
|||||||
@@ -146,9 +146,10 @@ std::string Windows64Minecraft::GetAuthenticationTicket() {
|
|||||||
|
|
||||||
static bool FetchSessionInfo() {
|
static bool FetchSessionInfo() {
|
||||||
std::vector<std::wstring> headers;
|
std::vector<std::wstring> headers;
|
||||||
|
headers.push_back(L"Authorization:" + Windows64Minecraft::GetAuthenticationTicket())
|
||||||
headers.push_back(L"Content-Type: text/plain");
|
headers.push_back(L"Content-Type: text/plain");
|
||||||
|
|
||||||
HttpResponse response = WinsockNetLayer::DoWinHttpRequest(L"auth.mclegacyedition.xyz", L"/accountinfo", L"POST", Windows64Minecraft::GetAuthenticationTicket(), headers);
|
HttpResponse response = WinsockNetLayer::DoWinHttpRequest(L"auth.mclegacyedition.xyz", L"/accountinfo", L"POST", "", headers);
|
||||||
|
|
||||||
if (response.status == 0) return false;
|
if (response.status == 0) return false;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user