{"action":"created","issue":{"url":"https://api.github.com/repos/golang/oauth2/issues/98","labels_url":"https://api.github.com/repos/golang/oauth2/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/golang/oauth2/issues/98/comments","events_url":"https://api.github.com/repos/golang/oauth2/issues/98/events","html_url":"https://github.com/golang/oauth2/issues/98","id":60717704,"number":98,"title":"Automatic configuration of oauth client transport for appengine?","user":{"login":"perezd","id":20598,"avatar_url":"https://avatars.githubusercontent.com/u/20598?v=3","gravatar_id":"","url":"https://api.github.com/users/perezd","html_url":"https://github.com/perezd","followers_url":"https://api.github.com/users/perezd/followers","following_url":"https://api.github.com/users/perezd/following{/other_user}","gists_url":"https://api.github.com/users/perezd/gists{/gist_id}","starred_url":"https://api.github.com/users/perezd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perezd/subscriptions","organizations_url":"https://api.github.com/users/perezd/orgs","repos_url":"https://api.github.com/users/perezd/repos","events_url":"https://api.github.com/users/perezd/events{/privacy}","received_events_url":"https://api.github.com/users/perezd/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-11T19:44:59Z","updated_at":"2015-03-12T16:42:44Z","closed_at":"2015-03-12T01:21:45Z","body":"In order to make this library work within appengine, I must write the following code:\r\n\r\n\r\n```\r\nfunc cloudContext(aeCtx context.Context) (context.Context, error) {\r\n        conf, err := google.JWTConfigFromJSON(json, storage.ScopeFullControl)\r\n        if err != nil {\r\n                return nil, err\r\n        }\r\n        client := conf.Client(aeCtx)\r\n        client.Transport = &oauth2.Transport{\r\n                Source: google.AppEngineTokenSource(aeCtx, storage.ScopeFullControl),\r\n                Base:   &urlfetch.Transport{Context: aeCtx},\r\n        }\r\n        return cloud.NewContext(projectId, client), nil\r\n}\r\n```\r\n\r\nWould it be possible for this library to auto-detect its running in an appengine context and configure the client transport automatically? "},"comment":{"url":"https://api.github.com/repos/golang/oauth2/issues/comments/78521838","html_url":"https://github.com/golang/oauth2/issues/98#issuecomment-78521838","issue_url":"https://api.github.com/repos/golang/oauth2/issues/98","id":78521838,"user":{"login":"perezd","id":20598,"avatar_url":"https://avatars.githubusercontent.com/u/20598?v=3","gravatar_id":"","url":"https://api.github.com/users/perezd","html_url":"https://github.com/perezd","followers_url":"https://api.github.com/users/perezd/followers","following_url":"https://api.github.com/users/perezd/following{/other_user}","gists_url":"https://api.github.com/users/perezd/gists{/gist_id}","starred_url":"https://api.github.com/users/perezd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perezd/subscriptions","organizations_url":"https://api.github.com/users/perezd/orgs","repos_url":"https://api.github.com/users/perezd/repos","events_url":"https://api.github.com/users/perezd/events{/privacy}","received_events_url":"https://api.github.com/users/perezd/received_events","type":"User","site_admin":false},"created_at":"2015-03-12T16:42:44Z","updated_at":"2015-03-12T16:42:44Z","body":"Cool thanks. Does this also address the urlfetch/roundtripper requirements\nfor GAE as well? I don't really see that in scope for #90.\n\nOn Wed, Mar 11, 2015 at 6:21 PM, Andrew Gerrand <notifications@github.com>\nwrote:\n\n> Yes, see #90 <https://github.com/golang/oauth2/issues/90>\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/golang/oauth2/issues/98#issuecomment-78407361>.\n>\n"}}