{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/492","labels_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/492/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/492/comments","events_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/492/events","html_url":"https://github.com/chrsmith/google-api-java-client/issues/492","id":59367683,"number":492,"title":"Code example for \"Installed Applications\" is wrong on OAuth2Native.java","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/labels/Type-Wiki","name":"Type-Wiki","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-01T00:04:50Z","updated_at":"2015-03-01T00:04:51Z","closed_at":null,"body":"```\nI'm using Java 6 and my google-api-java-client is 1.8.0-beta. The code example \nfor installed applications described on the class OAuth2Native.java is \npartially wrong, I suppose. I'm doing some requests for the Google Calendar API \nand I noted the credentialStore attribute from the AuthorizationCodeFlow was \nnull. Then, when doing multiple requests, it isn't possible to know if the user \ncredentials are set or not.\n\nThe current code example is:\n\nGoogleAuthorizationCodeFlow flow = new \nGoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, clientSecrets, \nscopes).build();\n\nBut I think it should be:\n\nGoogleAuthorizationCodeFlow flow = new \nGoogleAuthorizationCodeFlow.Builder(JACKSON_FACTORY, CLIENTS_SECRETS, \nSCOPES).new MemoryCredentialStore()).build();\n\nThe last one sets the MemoryCredentialStore on the Builder instance, but it \ncould be other credential store strategies, as stated in OAuth2 page.\n```\n\nOriginal issue reported on code.google.com by `rafael.n...@gmail.com` on 19 May 2012 at 2:16"},"comment":{"url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/comments/76559562","html_url":"https://github.com/chrsmith/google-api-java-client/issues/492#issuecomment-76559562","issue_url":"https://api.github.com/repos/chrsmith/google-api-java-client/issues/492","id":76559562,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-03-01T00:04:51Z","updated_at":"2015-03-01T00:04:51Z","body":"```\nhttps://code.google.com/p/google-api-java-client/wiki/OAuth2\n```\n\nOriginal comment by `yan...@google.com` on 14 Jan 2013 at 5:41\n* Changed state: **Accepted**"}}