summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/api/session.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Steam/src/api/session.h')
-rw-r--r--protocols/Steam/src/api/session.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/protocols/Steam/src/api/session.h b/protocols/Steam/src/api/session.h
new file mode 100644
index 0000000000..3e13a2e418
--- /dev/null
+++ b/protocols/Steam/src/api/session.h
@@ -0,0 +1,24 @@
+#ifndef _STEAM_REQUEST_SESSION_H_
+#define _STEAM_REQUEST_SESSION_H_
+
+class GetSessionRequest : public HttpRequest
+{
+public:
+ GetSessionRequest(const char *token, const char *steamId, const char *cookie) :
+ HttpRequest(REQUEST_POST, STEAM_WEB_URL "/mobileloginsucceeded")
+ {
+ flags = NLHRF_HTTP11 | NLHRF_SSL | NLHRF_NODUMP;
+
+ char data[512];
+ mir_snprintf(data, SIZEOF(data),
+ "oauth_token=%s&steamid=%s&webcookie=%s",
+ token,
+ steamId,
+ cookie);
+
+ SetData(data, strlen(data));
+ AddHeader("Content-Type", "application/x-www-form-urlencoded");
+ }
+};
+
+#endif //_STEAM_REQUEST_SESSION_H_