From 92c479869bb8f2a76a0af1c8969880d2b609d3ad Mon Sep 17 00:00:00 2001 From: Chris R Date: Wed, 2 Dec 2015 11:51:43 -0800 Subject: [PATCH] #600 Update the Twitter AuthenticationEndpoint --- src/Microsoft.AspNet.Authentication.Twitter/TwitterHandler.cs | 2 +- .../Twitter/TwitterMiddlewareTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.AspNet.Authentication.Twitter/TwitterHandler.cs b/src/Microsoft.AspNet.Authentication.Twitter/TwitterHandler.cs index 61709aafdc..8ea5ae42d6 100644 --- a/src/Microsoft.AspNet.Authentication.Twitter/TwitterHandler.cs +++ b/src/Microsoft.AspNet.Authentication.Twitter/TwitterHandler.cs @@ -24,7 +24,7 @@ namespace Microsoft.AspNet.Authentication.Twitter private static readonly DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); private const string StateCookie = "__TwitterState"; private const string RequestTokenEndpoint = "https://api.twitter.com/oauth/request_token"; - private const string AuthenticationEndpoint = "https://twitter.com/oauth/authenticate?oauth_token="; + private const string AuthenticationEndpoint = "https://api.twitter.com/oauth/authenticate?oauth_token="; private const string AccessTokenEndpoint = "https://api.twitter.com/oauth/access_token"; private readonly HttpClient _httpClient; diff --git a/test/Microsoft.AspNet.Authentication.Test/Twitter/TwitterMiddlewareTests.cs b/test/Microsoft.AspNet.Authentication.Test/Twitter/TwitterMiddlewareTests.cs index 36589a12d5..668f874811 100644 --- a/test/Microsoft.AspNet.Authentication.Test/Twitter/TwitterMiddlewareTests.cs +++ b/test/Microsoft.AspNet.Authentication.Test/Twitter/TwitterMiddlewareTests.cs @@ -148,7 +148,7 @@ namespace Microsoft.AspNet.Authentication.Twitter var transaction = await server.SendAsync("http://example.com/challenge"); Assert.Equal(HttpStatusCode.Redirect, transaction.Response.StatusCode); var location = transaction.Response.Headers.Location.AbsoluteUri; - Assert.Contains("https://twitter.com/oauth/authenticate?oauth_token=", location); + Assert.Contains("https://api.twitter.com/oauth/authenticate?oauth_token=", location); } private static TestServer CreateServer(Action configure, Func handler = null)