From fbe80ee64ee1e675f5b5e926c0c4afe858efdd9d Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Wed, 7 Jan 2015 18:10:42 -0800 Subject: [PATCH] Handle ReadFormAsync breaking changes. --- .../TwitterAuthenticationHandler.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.AspNet.Security.Twitter/TwitterAuthenticationHandler.cs b/src/Microsoft.AspNet.Security.Twitter/TwitterAuthenticationHandler.cs index 7717642a1d..de4dee266f 100644 --- a/src/Microsoft.AspNet.Security.Twitter/TwitterAuthenticationHandler.cs +++ b/src/Microsoft.AspNet.Security.Twitter/TwitterAuthenticationHandler.cs @@ -11,6 +11,7 @@ using System.Text; using System.Threading.Tasks; using Microsoft.AspNet.Http; using Microsoft.AspNet.Http.Security; +using Microsoft.AspNet.PipelineCore.Collections; using Microsoft.AspNet.Security.Infrastructure; using Microsoft.AspNet.Security.Twitter.Messages; using Microsoft.AspNet.WebUtilities; @@ -275,7 +276,7 @@ namespace Microsoft.AspNet.Security.Twitter response.EnsureSuccessStatusCode(); string responseText = await response.Content.ReadAsStringAsync(); - IFormCollection responseParameters = FormHelpers.ParseForm(responseText); + IFormCollection responseParameters = new FormCollection(FormReader.ReadForm(responseText)); if (string.Equals(responseParameters["oauth_callback_confirmed"], "true", StringComparison.Ordinal)) { return new RequestToken { Token = Uri.UnescapeDataString(responseParameters["oauth_token"]), TokenSecret = Uri.UnescapeDataString(responseParameters["oauth_token_secret"]), CallbackConfirmed = true, Properties = properties }; @@ -351,7 +352,7 @@ namespace Microsoft.AspNet.Security.Twitter string responseText = await response.Content.ReadAsStringAsync(); - IFormCollection responseParameters = FormHelpers.ParseForm(responseText); + IFormCollection responseParameters = new FormCollection(FormReader.ReadForm(responseText)); return new AccessToken {