From d070fa996e5ff3a6e74edd75bde5159bb9c0e1cd Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Fri, 20 May 2016 14:00:08 -0700 Subject: [PATCH] Update google token endpoint to v4 --- .../GoogleDefaults.cs | 2 +- .../Google/GoogleMiddlewareTests.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.AspNetCore.Authentication.Google/GoogleDefaults.cs b/src/Microsoft.AspNetCore.Authentication.Google/GoogleDefaults.cs index 06fd12eb1..c17ff6b2a 100644 --- a/src/Microsoft.AspNetCore.Authentication.Google/GoogleDefaults.cs +++ b/src/Microsoft.AspNetCore.Authentication.Google/GoogleDefaults.cs @@ -9,7 +9,7 @@ public static class GoogleDefaults public static readonly string AuthorizationEndpoint = "https://accounts.google.com/o/oauth2/auth"; - public static readonly string TokenEndpoint = "https://www.googleapis.com/oauth2/v3/token"; + public static readonly string TokenEndpoint = "https://www.googleapis.com/oauth2/v4/token"; public static readonly string UserInformationEndpoint = "https://www.googleapis.com/plus/v1/people/me"; } diff --git a/test/Microsoft.AspNetCore.Authentication.Test/Google/GoogleMiddlewareTests.cs b/test/Microsoft.AspNetCore.Authentication.Test/Google/GoogleMiddlewareTests.cs index 31fb9e317..42cecf81b 100644 --- a/test/Microsoft.AspNetCore.Authentication.Test/Google/GoogleMiddlewareTests.cs +++ b/test/Microsoft.AspNetCore.Authentication.Test/Google/GoogleMiddlewareTests.cs @@ -299,7 +299,7 @@ public async Task ReplyPathWillAuthenticateValidAuthorizeCodeAndState(string cla { Sender = req => { - if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v3/token") + if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v4/token") { return ReturnJsonResponse(new { @@ -489,7 +489,7 @@ public async Task AuthenticatedEventCanGetRefreshToken() { Sender = req => { - if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v3/token") + if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v4/token") { return ReturnJsonResponse(new { @@ -569,7 +569,7 @@ public async Task NullRedirectUriWillRedirectToSlash() { Sender = req => { - if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v3/token") + if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v4/token") { return ReturnJsonResponse(new { @@ -659,7 +659,7 @@ public async Task ValidateAuthenticatedContext() { Sender = req => { - if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v3/token") + if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v4/token") { return ReturnJsonResponse(new {