コード例 #1
0
        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);
        }