Move userId to post data

pull/702/head
LukePulverenti Luke Pulverenti luke pulverenti 12 years ago
parent 3538789e46
commit 79cfbb1768

@ -12,7 +12,7 @@ namespace MediaBrowser.Api.HttpHandlers
{
protected override async Task<AuthenticationResult> GetObjectToSerialize()
{
Guid userId = Guid.Parse(QueryString["userid"]);
Guid userId = Guid.Parse(await GetFormValue("userId").ConfigureAwait(false));
User user = Kernel.Instance.Users.First(u => u.Id == userId);
string password = await GetFormValue("password").ConfigureAwait(false);

@ -657,7 +657,9 @@ namespace MediaBrowser.ApiInteraction
string url = ApiUrl + "/UserAuthentication?userId=" + userId;
url += "&dataformat=" + SerializationFormat.ToString();
HttpContent content = new StringContent("password=" + password, Encoding.UTF8, "application/x-www-form-urlencoded");
string postContent = string.Format("userid={0}&password={1}", userId, password);
HttpContent content = new StringContent(postContent, Encoding.UTF8, "application/x-www-form-urlencoded");
HttpResponseMessage msg = await HttpClient.PostAsync(url, content).ConfigureAwait(false);

Loading…
Cancel
Save