{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/pulls/comments/198133029","pull_request_review_id":132005253,"id":198133029,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODEzMzAyOQ==","diff_hunk":"@@ -0,0 +1,91 @@\n+// Copyright 2018 Google LLC\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//     http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_CREDENTIAL_CONSTANTS_H_\n+#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_CREDENTIAL_CONSTANTS_H_\n+\n+#include \"google/cloud/storage/version.h\"\n+#include <chrono>\n+\n+namespace google {\n+namespace cloud {\n+namespace storage {\n+inline namespace STORAGE_CLIENT_NS {\n+namespace internal {\n+\n+/**\n+ * Supported signing algorithms used in JWT auth flows.\n+ *\n+ * We currently only support RSA with SHA-256, but use this enum for\n+ * readability and easy addition of support for other algorithms.\n+ */\n+enum class JwtSigningAlgorithms { RS256 };\n+\n+/// The endpoint to create an access token from.\n+inline const char* GoogleOAuthRefreshEndpoint() {\n+  // TODO(#769): Transition to using the new audience endpoint:\n+  // https://oauth2.googleapis.com/token\n+  static constexpr char endpoint[] =\n+      \"https://accounts.google.com/o/oauth2/token\";\n+  return endpoint;\n+}\n+\n+/// The max lifetime of an access token, in seconds.","path":"google/cloud/storage/internal/credential_constants.h","position":44,"original_position":44,"commit_id":"21498010be5e5359dba82b2912abd2c88bf3ad78","original_commit_id":"21498010be5e5359dba82b2912abd2c88bf3ad78","user":{"login":"coryan","id":6241635,"node_id":"MDQ6VXNlcjYyNDE2MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/6241635?v=4","gravatar_id":"","url":"https://api.github.com/users/coryan","html_url":"https://github.com/coryan","followers_url":"https://api.github.com/users/coryan/followers","following_url":"https://api.github.com/users/coryan/following{/other_user}","gists_url":"https://api.github.com/users/coryan/gists{/gist_id}","starred_url":"https://api.github.com/users/coryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coryan/subscriptions","organizations_url":"https://api.github.com/users/coryan/orgs","repos_url":"https://api.github.com/users/coryan/repos","events_url":"https://api.github.com/users/coryan/events{/privacy}","received_events_url":"https://api.github.com/users/coryan/received_events","type":"User","site_admin":false},"body":"Consider returning `std::chrono::seconds` which would make the units obvious, can be done in a future PR with a TODO.\r\n","created_at":"2018-06-26T13:00:52Z","updated_at":"2018-06-26T13:30:21Z","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-cpp/pull/766#discussion_r198133029","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/pulls/766","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/pulls/comments/198133029"},"html":{"href":"https://github.com/GoogleCloudPlatform/google-cloud-cpp/pull/766#discussion_r198133029"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/pulls/766"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/pulls/766","id":196986465,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2OTg2NDY1","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-cpp/pull/766","diff_url":"https://github.com/GoogleCloudPlatform/google-cloud-cpp/pull/766.diff","patch_url":"https://github.com/GoogleCloudPlatform/google-cloud-cpp/pull/766.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/issues/766","number":766,"state":"open","locked":false,"title":"Add support for basic service account credentials.","user":{"login":"houglum","id":14894525,"node_id":"MDQ6VXNlcjE0ODk0NTI1","avatar_url":"https://avatars0.githubusercontent.com/u/14894525?v=4","gravatar_id":"","url":"https://api.github.com/users/houglum","html_url":"https://github.com/houglum","followers_url":"https://api.github.com/users/houglum/followers","following_url":"https://api.github.com/users/houglum/following{/other_user}","gists_url":"https://api.github.com/users/houglum/gists{/gist_id}","starred_url":"https://api.github.com/users/houglum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houglum/subscriptions","organizations_url":"https://api.github.com/users/houglum/orgs","repos_url":"https://api.github.com/users/houglum/repos","events_url":"https://api.github.com/users/houglum/events{/privacy}","received_events_url":"https://api.github.com/users/houglum/received_events","type":"User","site_admin":false},"body":"This class supports going through the JWT flow to retreive an access\r\ntoken.\r\n\r\nIt requires supplying a JSON-formatted keyfile (which can be\r\ndownloaded from the Google Cloud Console) in the filename defined\r\nin the GOOGLE_APPLICATION_CREDENTIALS environment variable. The\r\nJSON format contains information necessary for completing the JWT\r\nrefresh flow, thus other formats (e.g. .p12 keyfiles) are not supported.","created_at":"2018-06-25T02:17:12Z","updated_at":"2018-06-26T13:30:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6cce0167bd8bce0f2d04bcb62daf57db4a2fe495","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":760104389,"node_id":"MDU6TGFiZWw3NjAxMDQzODk=","url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/labels/cla:%20yes","name":"cla: yes","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/pulls/766/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/pulls/766/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/issues/766/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/statuses/21498010be5e5359dba82b2912abd2c88bf3ad78","head":{"label":"houglum:service-account-credentials","ref":"service-account-credentials","sha":"21498010be5e5359dba82b2912abd2c88bf3ad78","user":{"login":"houglum","id":14894525,"node_id":"MDQ6VXNlcjE0ODk0NTI1","avatar_url":"https://avatars0.githubusercontent.com/u/14894525?v=4","gravatar_id":"","url":"https://api.github.com/users/houglum","html_url":"https://github.com/houglum","followers_url":"https://api.github.com/users/houglum/followers","following_url":"https://api.github.com/users/houglum/following{/other_user}","gists_url":"https://api.github.com/users/houglum/gists{/gist_id}","starred_url":"https://api.github.com/users/houglum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houglum/subscriptions","organizations_url":"https://api.github.com/users/houglum/orgs","repos_url":"https://api.github.com/users/houglum/repos","events_url":"https://api.github.com/users/houglum/events{/privacy}","received_events_url":"https://api.github.com/users/houglum/received_events","type":"User","site_admin":false},"repo":{"id":136766348,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY3NjYzNDg=","name":"google-cloud-cpp","full_name":"houglum/google-cloud-cpp","owner":{"login":"houglum","id":14894525,"node_id":"MDQ6VXNlcjE0ODk0NTI1","avatar_url":"https://avatars0.githubusercontent.com/u/14894525?v=4","gravatar_id":"","url":"https://api.github.com/users/houglum","html_url":"https://github.com/houglum","followers_url":"https://api.github.com/users/houglum/followers","following_url":"https://api.github.com/users/houglum/following{/other_user}","gists_url":"https://api.github.com/users/houglum/gists{/gist_id}","starred_url":"https://api.github.com/users/houglum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houglum/subscriptions","organizations_url":"https://api.github.com/users/houglum/orgs","repos_url":"https://api.github.com/users/houglum/repos","events_url":"https://api.github.com/users/houglum/events{/privacy}","received_events_url":"https://api.github.com/users/houglum/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/houglum/google-cloud-cpp","description":"Google Cloud Client Library for C++","fork":true,"url":"https://api.github.com/repos/houglum/google-cloud-cpp","forks_url":"https://api.github.com/repos/houglum/google-cloud-cpp/forks","keys_url":"https://api.github.com/repos/houglum/google-cloud-cpp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/houglum/google-cloud-cpp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/houglum/google-cloud-cpp/teams","hooks_url":"https://api.github.com/repos/houglum/google-cloud-cpp/hooks","issue_events_url":"https://api.github.com/repos/houglum/google-cloud-cpp/issues/events{/number}","events_url":"https://api.github.com/repos/houglum/google-cloud-cpp/events","assignees_url":"https://api.github.com/repos/houglum/google-cloud-cpp/assignees{/user}","branches_url":"https://api.github.com/repos/houglum/google-cloud-cpp/branches{/branch}","tags_url":"https://api.github.com/repos/houglum/google-cloud-cpp/tags","blobs_url":"https://api.github.com/repos/houglum/google-cloud-cpp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/houglum/google-cloud-cpp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/houglum/google-cloud-cpp/git/refs{/sha}","trees_url":"https://api.github.com/repos/houglum/google-cloud-cpp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/houglum/google-cloud-cpp/statuses/{sha}","languages_url":"https://api.github.com/repos/houglum/google-cloud-cpp/languages","stargazers_url":"https://api.github.com/repos/houglum/google-cloud-cpp/stargazers","contributors_url":"https://api.github.com/repos/houglum/google-cloud-cpp/contributors","subscribers_url":"https://api.github.com/repos/houglum/google-cloud-cpp/subscribers","subscription_url":"https://api.github.com/repos/houglum/google-cloud-cpp/subscription","commits_url":"https://api.github.com/repos/houglum/google-cloud-cpp/commits{/sha}","git_commits_url":"https://api.github.com/repos/houglum/google-cloud-cpp/git/commits{/sha}","comments_url":"https://api.github.com/repos/houglum/google-cloud-cpp/comments{/number}","issue_comment_url":"https://api.github.com/repos/houglum/google-cloud-cpp/issues/comments{/number}","contents_url":"https://api.github.com/repos/houglum/google-cloud-cpp/contents/{+path}","compare_url":"https://api.github.com/repos/houglum/google-cloud-cpp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/houglum/google-cloud-cpp/merges","archive_url":"https://api.github.com/repos/houglum/google-cloud-cpp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/houglum/google-cloud-cpp/downloads","issues_url":"https://api.github.com/repos/houglum/google-cloud-cpp/issues{/number}","pulls_url":"https://api.github.com/repos/houglum/google-cloud-cpp/pulls{/number}","milestones_url":"https://api.github.com/repos/houglum/google-cloud-cpp/milestones{/number}","notifications_url":"https://api.github.com/repos/houglum/google-cloud-cpp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/houglum/google-cloud-cpp/labels{/name}","releases_url":"https://api.github.com/repos/houglum/google-cloud-cpp/releases{/id}","deployments_url":"https://api.github.com/repos/houglum/google-cloud-cpp/deployments","created_at":"2018-06-09T23:59:40Z","updated_at":"2018-06-09T23:59:43Z","pushed_at":"2018-06-26T04:01:40Z","git_url":"git://github.com/houglum/google-cloud-cpp.git","ssh_url":"git@github.com:houglum/google-cloud-cpp.git","clone_url":"https://github.com/houglum/google-cloud-cpp.git","svn_url":"https://github.com/houglum/google-cloud-cpp","homepage":"https://cloud.google.com/","size":87187,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"018eac84599b35818f673abf0af7e5f35467eae6","user":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":111860063,"node_id":"MDEwOlJlcG9zaXRvcnkxMTE4NjAwNjM=","name":"google-cloud-cpp","full_name":"GoogleCloudPlatform/google-cloud-cpp","owner":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/google-cloud-cpp","description":"Google Cloud Client Library for C++","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/deployments","created_at":"2017-11-24T00:19:31Z","updated_at":"2018-06-26T12:22:47Z","pushed_at":"2018-06-26T12:36:21Z","git_url":"git://github.com/GoogleCloudPlatform/google-cloud-cpp.git","ssh_url":"git@github.com:GoogleCloudPlatform/google-cloud-cpp.git","clone_url":"https://github.com/GoogleCloudPlatform/google-cloud-cpp.git","svn_url":"https://github.com/GoogleCloudPlatform/google-cloud-cpp","homepage":"https://cloud.google.com/","size":87435,"stargazers_count":32,"watchers_count":32,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":20,"mirror_url":null,"archived":false,"open_issues_count":136,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":20,"open_issues":136,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/pulls/766"},"html":{"href":"https://github.com/GoogleCloudPlatform/google-cloud-cpp/pull/766"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/issues/766"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/issues/766/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/pulls/766/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/pulls/766/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-cpp/statuses/21498010be5e5359dba82b2912abd2c88bf3ad78"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"coryan"}}