summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/api/authorization.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Steam/src/api/authorization.h')
-rw-r--r--protocols/Steam/src/api/authorization.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/protocols/Steam/src/api/authorization.h b/protocols/Steam/src/api/authorization.h
index cba8d4d274..3d02c5deb5 100644
--- a/protocols/Steam/src/api/authorization.h
+++ b/protocols/Steam/src/api/authorization.h
@@ -5,27 +5,27 @@ class AuthorizationRequest : public HttpRequest
{
public:
AuthorizationRequest(const char *username, const char *password, const char *timestamp, const char *twoFactorCode, const char *guardCode, const char *guardId = "", const char *captchaId = "-1", const char *captchaText = "") :
- HttpRequest(REQUEST_POST, STEAM_WEB_URL "/mobilelogin/dologin/")
+ HttpRequest(HttpPost, STEAM_WEB_URL "/mobilelogin/dologin/")
{
flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_NODUMP;
- AddHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");
- AddHeader("Referer", STEAM_WEB_URL "/mobilelogin/dologin?oauth_client_id=3638BFB1&oauth_scope=read_profile%20write_profile%20read_client%20write_client");
- AddHeader("Cookie", "mobileClientVersion=1291812;forceMobile=1;mobileClient=ios");
+ Headers
+ << CHAR_PARAM("Referer", STEAM_WEB_URL "/mobilelogin/dologin?oauth_client_id=3638BFB1&oauth_scope=read_profile%20write_profile%20read_client%20write_client")
+ << CHAR_PARAM("Cookie", "mobileClientVersion=1291812;forceMobile=1;mobileClient=ios");
- CMStringA data;
- data.AppendFormat("password=%s&username=%s&twofactorcode=%s&emailauth=%s&loginfriendlyname=%s&oauth_client_id=3638BFB1&captchagid=%s&captcha_text=%s&emailsteamid=%s&rsatimestamp=%s&rememberlogin=false&donotcache=%lld",
- ptrA(mir_urlEncode(password)),
- ptrA(mir_urlEncode(username)),
- twoFactorCode,
- guardCode,
- "Miranda%20NG",
- captchaId,
- ptrA(mir_urlEncode(captchaText)),
- guardId,
- timestamp,
- time(NULL));
- SetData(data, data.GetLength());
+ Content = new FormUrlEncodedContent(this)
+ << CHAR_PARAM("oauth_client_id", "3638BFB1")
+ << CHAR_PARAM("loginfriendlyname", "Miranda NG")
+ << CHAR_PARAM("password", password)
+ << CHAR_PARAM("username", username)
+ << CHAR_PARAM("twofactorcode", twoFactorCode)
+ << CHAR_PARAM("emailsteamid", guardId)
+ << CHAR_PARAM("emailauth", guardCode)
+ << CHAR_PARAM("captchagid", captchaId)
+ << CHAR_PARAM("captcha_text", captchaText)
+ << CHAR_PARAM("rsatimestamp", timestamp)
+ << BOOL_PARAM("rememberlogin", false)
+ << INT64_PARAM("donotcache", time(NULL));
}
};