Ich mache GAE Java-AnwendungWie Google OAuth2 id_token
Authorization sieht aus wie
GoogleAuthorizationCodeFlow.Builder
(
new NetHttpTransport(),
JacksonFactory.getDefaultInstance(),
AppConfig.clientId,
AppConfig.clientSecret,
Collections.singleton("openid email")
)
.setAccessType("offline").build();
Das Callback-Servlet von hier genommen bekommen: https://developers.google.com/api-client-library/java/google-api-java-client/oauth2#authorization_code_flow
Erfolgsmethode in Probe zur Verfügung gestellt sieht aus wie Dies ist:
protected void onSuccess(HttpServletRequest req, HttpServletResponse resp, Credential credential)
throws ServletException, IOException {
resp.sendRedirect("/");
}
von 'Credential' Objekt kann ich ge t accessToken und refreshToken. Wo ist id_token? Wie bekomme ich es? Es ist auch nicht in 'req'.
ich etwas falsch Link gegeben haben - es ist für generische oauth2 Neuer Link für GoogleAPI Client Von dort ist war, wird Ihnen, dass GoogleAuthorizationCodeFlow Klasse überhaupt nicht veraltet finden. Und mein Problem bleibt immer noch ungelöst ... – deer