private async Task <DoLoginResource> DoLogin(GetRsaKeyResource getRsaKeyResource, string password, string username, string twoFactorCode) { var encryptedPassword = Encrypter.Create(getRsaKeyResource, password); var content = PostDataFactory.CreateDoLoginData(username, encryptedPassword, getRsaKeyResource.Timestamp, twoFactorCode); var requestMessage = new RequestMessage(HttpMethod.Post, _baseUrl + "login/dologin", body: content); var doLoginResource = await _jsonRequestParser.ExecuteAsType <DoLoginResource>(requestMessage); return(doLoginResource); }
private DoLoginResponse DoLogin(GetRsaKeyResponse getRsaKeyResponse, string username, string password, string sharedSecret) { DoLoginResponse doLoginResponse = null; var encryptedPassword = EncryptPasswordFactory.Create(getRsaKeyResponse, password); var content = PostDataFactory.CreateDoLoginData(username, encryptedPassword, getRsaKeyResponse.Timestamp, TwoFactorCodeFactory.Create(sharedSecret)); var response = _requestFactory.Create(HttpMethod.POST, Uris.SteamCommunitySecureBase, SteamCommunityEndpoints.DoLogin, Accept.All, HttpHeaderValues.AcceptLanguageOne, false, true, true, true, false, content); string responseContent = response.Content.ReadAsStringAsync().Result; doLoginResponse = JsonConvert.DeserializeObject <DoLoginResponse>(responseContent); return(doLoginResponse); }
private List <KeyValuePair <string, string> > GetDoLoginData() { return(PostDataFactory.CreateDoLoginData("coolUsername01", "o7y4EHhhBs0AaAQtm6LfwdY0SOTcKz57cbqgzrZqSH74PqKOeZ5xDbSfgoqMkOlEUp4ppVNKKRapoGRKecrOtVgcPGhYLpxuw0zcwLjsYQVUYWkOWaVHBnMGJF3L0oghUJl4PEkK0loE5XCfJLhEK3Vg1u8lqrwDJEj16m4sSH4nRiWegcWtLMyZ3hob8xbLHYjORkEZdZI3YlDfrnthXDUQrxzMZPAlADM9UQxUs8CnVTX0igQSAvshkRIaVWAYnBJgBseLWIFCd6bPoMM7Hyngi0oUQhMcVwjjPsXS5axjbjGdwF6Y6gcH4pGbu8FRQ3Tnb4gPhUCZKsS1UOJWmd==", "464749950000", "6IPMI")); }