I'm using Java 6 and my google-api-java-client is 1.8.0-beta. The code example
for installed applications described on the class OAuth2Native.java is
partially wrong, I suppose. I'm doing some requests for the Google Calendar API
and I noted the credentialStore attribute from the AuthorizationCodeFlow was
null. Then, when doing multiple requests, it isn't possible to know if the user
credentials are set or not.
The current code example is:
GoogleAuthorizationCodeFlow flow = new
GoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, clientSecrets,
scopes).build();
But I think it should be:
GoogleAuthorizationCodeFlow flow = new
GoogleAuthorizationCodeFlow.Builder(JACKSON_FACTORY, CLIENTS_SECRETS,
SCOPES).new MemoryCredentialStore()).build();
The last one sets the MemoryCredentialStore on the Builder instance, but it
could be other credential store strategies, as stated in OAuth2 page.
Original issue reported on code.google.com by rafael.n...@gmail.com on 19 May 2012 at 2:16
Original issue reported on code.google.com by
rafael.n...@gmail.com
on 19 May 2012 at 2:16