From a231598337321fccda3179373a7bed9e3f644032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Souza=20J=C3=BAnior?= Date: Thu, 26 Jun 2014 09:50:33 -0300 Subject: [PATCH] Update userinfo endpoint "You must replace the userinfo endpoint with the people.get endpoint by using the following HTTP request path: https://www.googleapis.com/plus/v1/people/me" Reference: https://developers.google.com/+/api/auth-migration#userinfo --- src/main/java/com/googleoauth/GoogleOauthServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/googleoauth/GoogleOauthServer.java b/src/main/java/com/googleoauth/GoogleOauthServer.java index f211485..87bc9c1 100644 --- a/src/main/java/com/googleoauth/GoogleOauthServer.java +++ b/src/main/java/com/googleoauth/GoogleOauthServer.java @@ -126,7 +126,7 @@ protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws Se req.getSession().setAttribute("access_token", accessToken); // get some info about the user with the access token - String json = get(new StringBuilder("https://www.googleapis.com/oauth2/v1/userinfo?access_token=").append(accessToken).toString()); + String json = get(new StringBuilder("https://www.googleapis.com/plus/v1/people/me?access_token=").append(accessToken).toString()); // now we could store the email address in session