{"action":"created","issue":{"url":"https://api.github.com/repos/rstats-db/bigrquery/issues/61","labels_url":"https://api.github.com/repos/rstats-db/bigrquery/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/rstats-db/bigrquery/issues/61/comments","events_url":"https://api.github.com/repos/rstats-db/bigrquery/issues/61/events","html_url":"https://github.com/rstats-db/bigrquery/pull/61","id":118946211,"number":61,"title":"Sketch of a credential fetch registration system.","user":{"login":"craigcitro","id":468559,"avatar_url":"https://avatars.githubusercontent.com/u/468559?v=3","gravatar_id":"","url":"https://api.github.com/users/craigcitro","html_url":"https://github.com/craigcitro","followers_url":"https://api.github.com/users/craigcitro/followers","following_url":"https://api.github.com/users/craigcitro/following{/other_user}","gists_url":"https://api.github.com/users/craigcitro/gists{/gist_id}","starred_url":"https://api.github.com/users/craigcitro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigcitro/subscriptions","organizations_url":"https://api.github.com/users/craigcitro/orgs","repos_url":"https://api.github.com/users/craigcitro/repos","events_url":"https://api.github.com/users/craigcitro/events{/privacy}","received_events_url":"https://api.github.com/users/craigcitro/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-11-26T00:14:17Z","updated_at":"2016-01-15T08:11:20Z","closed_at":"2016-01-15T08:11:20Z","pull_request":{"url":"https://api.github.com/repos/rstats-db/bigrquery/pulls/61","html_url":"https://github.com/rstats-db/bigrquery/pull/61","diff_url":"https://github.com/rstats-db/bigrquery/pull/61.diff","patch_url":"https://github.com/rstats-db/bigrquery/pull/61.patch"},"body":"This is still quite rough, but it's a stab at trying to support credential\r\nregistration in bigrquery (which we'd potentially want to move into httr?).\r\nThis would allow us to have packages provide their own credential fetch\r\nmechanisms which get used in the default \"get an access token\" path; two\r\nimportant use cases for this:\r\n\r\n* For Travis, we could have the travis package simply register a new\r\n  credential mechanism that fetches from the environment. Now travis\r\n  credentials can be used in many packages just by adding a dependency and\r\n  loading it (assuming we add some code in `zzz.R` for travis).\r\n\r\n* For systems like AWS EC2 and GCE, there's a notion of credentials associated\r\n  with the machine itself (GCE calls this a service account, I forget if AWS\r\n  uses the same term). We could add a hook (here or in another package)\r\n  to **transparently** use those credentials when available.\r\n\r\nNote that this is just a sketch, I'm looking to incite some conversation. There are still questions to be handled (how does one control order being a big one).\r\n\r\nOnce we get closer, feel free to pick apart how much my R looks like I've been\r\nwriting Python all day. :wink: In particular, I clearly modeled this as something I'd use with a decorator in Python; what's the idiomatic way to do that in R?\r\n\r\nAdding several folks for conversation: @deflaux @jennybc @hadley @jeroenooms "},"comment":{"url":"https://api.github.com/repos/rstats-db/bigrquery/issues/comments/171898034","html_url":"https://github.com/rstats-db/bigrquery/pull/61#issuecomment-171898034","issue_url":"https://api.github.com/repos/rstats-db/bigrquery/issues/61","id":171898034,"user":{"login":"craigcitro","id":468559,"avatar_url":"https://avatars.githubusercontent.com/u/468559?v=3","gravatar_id":"","url":"https://api.github.com/users/craigcitro","html_url":"https://github.com/craigcitro","followers_url":"https://api.github.com/users/craigcitro/followers","following_url":"https://api.github.com/users/craigcitro/following{/other_user}","gists_url":"https://api.github.com/users/craigcitro/gists{/gist_id}","starred_url":"https://api.github.com/users/craigcitro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigcitro/subscriptions","organizations_url":"https://api.github.com/users/craigcitro/orgs","repos_url":"https://api.github.com/users/craigcitro/repos","events_url":"https://api.github.com/users/craigcitro/events{/privacy}","received_events_url":"https://api.github.com/users/craigcitro/received_events","type":"User","site_admin":false},"created_at":"2016-01-15T08:11:20Z","updated_at":"2016-01-15T08:11:20Z","body":"OK, still not there yet, but https://github.com/ropenscilabs/gauth is at least starting to get a little code.\r\n\r\nClosing this -- all the action's happening there."}}