GoogleOAuthService: Stop using deprecated Google+ userinfo endpoint
The Google+ Sign-in feature is fully deprecated and is being shut down
on March 7, 2019. This will be a progressive shutdown, with intermittent
failures starting as early as January 28, 2019. Developers should migrate
to the more comprehensive Google Sign-in authentication system.
Switch to using OAuth2 userinfo endpoint: [1].
[1] https://developers.google.com/+/web/signin
Change-Id: I01f8b5816e39226da4fde2dcf66cc43670d94c08
diff --git a/src/main/java/com/googlesource/gerrit/plugins/oauth/GoogleOAuthService.java b/src/main/java/com/googlesource/gerrit/plugins/oauth/GoogleOAuthService.java
index b051bad..69453fd 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/oauth/GoogleOAuthService.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/oauth/GoogleOAuthService.java
@@ -56,8 +56,7 @@
LoggerFactory.getLogger(GoogleOAuthService.class);
static final String CONFIG_SUFFIX = "-google-oauth";
private static final String PROTECTED_RESOURCE_URL =
- "https://www.googleapis.com/userinfo/v2/me";
- //"https://www.googleapis.com/plus/v1/people/me/openIdConnect";
+ "https://www.googleapis.com/oauth2/v2/userinfo";
private static final String SCOPE = "email profile";
private final OAuthService service;
private final String canonicalWebUrl;