{"action":"created","comment":{"url":"https://api.github.com/repos/docker/docker/pulls/comments/70685807","id":70685807,"diff_hunk":"@@ -168,6 +179,34 @@ func loginV2(authConfig *types.AuthConfig, endpoint APIEndpoint, userAgent strin\n \n }\n \n+func v2AuthHTTPClient(endpoint *url.URL, authTransport http.RoundTripper, modifiers []transport.RequestModifier, creds auth.CredentialStore, scopes []auth.Scope) (*http.Client, bool, error) {\n+\tchallengeManager, foundV2, err := PingV2Registry(endpoint, authTransport)\n+\tif err != nil {\n+\t\tif !foundV2 {\n+\t\t\terr = fallbackError{err: err}\n+\t\t}\n+\t\treturn nil, foundV2, err\n+\t}\n+\n+\ttokenHandlerOptions := auth.TokenHandlerOptions{\n+\t\tTransport:     authTransport,\n+\t\tCredentials:   creds,\n+\t\tOfflineAccess: true,\n+\t\tClientID:      AuthClientID,\n+\t\tScopes:        scopes,\n+\t}\n+\ttokenHandler := auth.NewTokenHandlerWithOptions(tokenHandlerOptions)\n+\tbasicHandler := auth.NewBasicHandler(creds)\n+\tmodifiers = append(modifiers, auth.NewAuthorizer(challengeManager, tokenHandler, basicHandler))\n+\ttr := transport.NewTransport(authTransport, modifiers...)\n+\n+\treturn &http.Client{\n+\t\tTransport: tr,\n+\t\tTimeout:   5 * time.Second,","path":"registry/auth.go","position":102,"original_position":102,"commit_id":"94515c9cb37452733c3e22b4d63b4c6e604b7847","original_commit_id":"94515c9cb37452733c3e22b4d63b4c6e604b7847","user":{"login":"dmcgowan","id":169601,"avatar_url":"https://avatars.githubusercontent.com/u/169601?v=3","gravatar_id":"","url":"https://api.github.com/users/dmcgowan","html_url":"https://github.com/dmcgowan","followers_url":"https://api.github.com/users/dmcgowan/followers","following_url":"https://api.github.com/users/dmcgowan/following{/other_user}","gists_url":"https://api.github.com/users/dmcgowan/gists{/gist_id}","starred_url":"https://api.github.com/users/dmcgowan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmcgowan/subscriptions","organizations_url":"https://api.github.com/users/dmcgowan/orgs","repos_url":"https://api.github.com/users/dmcgowan/repos","events_url":"https://api.github.com/users/dmcgowan/events{/privacy}","received_events_url":"https://api.github.com/users/dmcgowan/received_events","type":"User","site_admin":false},"body":"Could use 15 seconds, I think 5 was used for other clients and it was increased for login. Given search may be slower anyway leaving at 15 makes sense.","created_at":"2016-07-13T18:50:10Z","updated_at":"2016-07-13T18:50:10Z","html_url":"https://github.com/docker/docker/pull/24568#discussion_r70685807","pull_request_url":"https://api.github.com/repos/docker/docker/pulls/24568","_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/70685807"},"html":{"href":"https://github.com/docker/docker/pull/24568#discussion_r70685807"},"pull_request":{"href":"https://api.github.com/repos/docker/docker/pulls/24568"}}},"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/24568","id":77215590,"html_url":"https://github.com/docker/docker/pull/24568","diff_url":"https://github.com/docker/docker/pull/24568.diff","patch_url":"https://github.com/docker/docker/pull/24568.patch","issue_url":"https://api.github.com/repos/docker/docker/issues/24568","number":24568,"state":"open","locked":false,"title":"Allow v1 search to use v2 auth with identity token","user":{"login":"dmcgowan","id":169601,"avatar_url":"https://avatars.githubusercontent.com/u/169601?v=3","gravatar_id":"","url":"https://api.github.com/users/dmcgowan","html_url":"https://github.com/dmcgowan","followers_url":"https://api.github.com/users/dmcgowan/followers","following_url":"https://api.github.com/users/dmcgowan/following{/other_user}","gists_url":"https://api.github.com/users/dmcgowan/gists{/gist_id}","starred_url":"https://api.github.com/users/dmcgowan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmcgowan/subscriptions","organizations_url":"https://api.github.com/users/dmcgowan/orgs","repos_url":"https://api.github.com/users/dmcgowan/repos","events_url":"https://api.github.com/users/dmcgowan/events{/privacy}","received_events_url":"https://api.github.com/users/dmcgowan/received_events","type":"User","site_admin":false},"body":"Updates the v1 search endpoint to also support v2 auth when an identity token is given. Only search v1 endpoint is supported since there is not v2 search currently defined to replace it.\r\n\r\nFixes #22379.","created_at":"2016-07-13T00:56:01Z","updated_at":"2016-07-13T18:50:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"919c46122ada26bb96763574682a845f3aee5b89","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/docker/docker/milestones/53","html_url":"https://github.com/docker/docker/milestones/1.12.0","labels_url":"https://api.github.com/repos/docker/docker/milestones/53/labels","id":1657301,"number":53,"title":"1.12.0","description":"feature/code freeze: June 14th, 2016","creator":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars.githubusercontent.com/u/1804568?v=3","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"open_issues":126,"closed_issues":615,"state":"open","created_at":"2016-03-21T13:47:53Z","updated_at":"2016-07-13T18:40:02Z","due_on":"2016-07-28T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/docker/docker/pulls/24568/commits","review_comments_url":"https://api.github.com/repos/docker/docker/pulls/24568/comments","review_comment_url":"https://api.github.com/repos/docker/docker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/docker/issues/24568/comments","statuses_url":"https://api.github.com/repos/docker/docker/statuses/94515c9cb37452733c3e22b4d63b4c6e604b7847","head":{"label":"dmcgowan:search-v2-auth","ref":"search-v2-auth","sha":"94515c9cb37452733c3e22b4d63b4c6e604b7847","user":{"login":"dmcgowan","id":169601,"avatar_url":"https://avatars.githubusercontent.com/u/169601?v=3","gravatar_id":"","url":"https://api.github.com/users/dmcgowan","html_url":"https://github.com/dmcgowan","followers_url":"https://api.github.com/users/dmcgowan/followers","following_url":"https://api.github.com/users/dmcgowan/following{/other_user}","gists_url":"https://api.github.com/users/dmcgowan/gists{/gist_id}","starred_url":"https://api.github.com/users/dmcgowan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmcgowan/subscriptions","organizations_url":"https://api.github.com/users/dmcgowan/orgs","repos_url":"https://api.github.com/users/dmcgowan/repos","events_url":"https://api.github.com/users/dmcgowan/events{/privacy}","received_events_url":"https://api.github.com/users/dmcgowan/received_events","type":"User","site_admin":false},"repo":{"id":22739098,"name":"docker","full_name":"dmcgowan/docker","owner":{"login":"dmcgowan","id":169601,"avatar_url":"https://avatars.githubusercontent.com/u/169601?v=3","gravatar_id":"","url":"https://api.github.com/users/dmcgowan","html_url":"https://github.com/dmcgowan","followers_url":"https://api.github.com/users/dmcgowan/followers","following_url":"https://api.github.com/users/dmcgowan/following{/other_user}","gists_url":"https://api.github.com/users/dmcgowan/gists{/gist_id}","starred_url":"https://api.github.com/users/dmcgowan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmcgowan/subscriptions","organizations_url":"https://api.github.com/users/dmcgowan/orgs","repos_url":"https://api.github.com/users/dmcgowan/repos","events_url":"https://api.github.com/users/dmcgowan/events{/privacy}","received_events_url":"https://api.github.com/users/dmcgowan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dmcgowan/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/dmcgowan/docker","forks_url":"https://api.github.com/repos/dmcgowan/docker/forks","keys_url":"https://api.github.com/repos/dmcgowan/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmcgowan/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmcgowan/docker/teams","hooks_url":"https://api.github.com/repos/dmcgowan/docker/hooks","issue_events_url":"https://api.github.com/repos/dmcgowan/docker/issues/events{/number}","events_url":"https://api.github.com/repos/dmcgowan/docker/events","assignees_url":"https://api.github.com/repos/dmcgowan/docker/assignees{/user}","branches_url":"https://api.github.com/repos/dmcgowan/docker/branches{/branch}","tags_url":"https://api.github.com/repos/dmcgowan/docker/tags","blobs_url":"https://api.github.com/repos/dmcgowan/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmcgowan/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmcgowan/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmcgowan/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmcgowan/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/dmcgowan/docker/languages","stargazers_url":"https://api.github.com/repos/dmcgowan/docker/stargazers","contributors_url":"https://api.github.com/repos/dmcgowan/docker/contributors","subscribers_url":"https://api.github.com/repos/dmcgowan/docker/subscribers","subscription_url":"https://api.github.com/repos/dmcgowan/docker/subscription","commits_url":"https://api.github.com/repos/dmcgowan/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmcgowan/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmcgowan/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmcgowan/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmcgowan/docker/contents/{+path}","compare_url":"https://api.github.com/repos/dmcgowan/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmcgowan/docker/merges","archive_url":"https://api.github.com/repos/dmcgowan/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmcgowan/docker/downloads","issues_url":"https://api.github.com/repos/dmcgowan/docker/issues{/number}","pulls_url":"https://api.github.com/repos/dmcgowan/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/dmcgowan/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/dmcgowan/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmcgowan/docker/labels{/name}","releases_url":"https://api.github.com/repos/dmcgowan/docker/releases{/id}","deployments_url":"https://api.github.com/repos/dmcgowan/docker/deployments","created_at":"2014-08-07T22:58:18Z","updated_at":"2016-06-15T17:11:21Z","pushed_at":"2016-07-13T00:54:09Z","git_url":"git://github.com/dmcgowan/docker.git","ssh_url":"git@github.com:dmcgowan/docker.git","clone_url":"https://github.com/dmcgowan/docker.git","svn_url":"https://github.com/dmcgowan/docker","homepage":"http://www.docker.com","size":96094,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"489adc96b84ed55bfef0abcb654991620be5510f","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":7691631,"name":"docker","full_name":"docker/docker","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/docker","description":"Docker - the open-source application container engine","fork":false,"url":"https://api.github.com/repos/docker/docker","forks_url":"https://api.github.com/repos/docker/docker/forks","keys_url":"https://api.github.com/repos/docker/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/docker/teams","hooks_url":"https://api.github.com/repos/docker/docker/hooks","issue_events_url":"https://api.github.com/repos/docker/docker/issues/events{/number}","events_url":"https://api.github.com/repos/docker/docker/events","assignees_url":"https://api.github.com/repos/docker/docker/assignees{/user}","branches_url":"https://api.github.com/repos/docker/docker/branches{/branch}","tags_url":"https://api.github.com/repos/docker/docker/tags","blobs_url":"https://api.github.com/repos/docker/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/docker/languages","stargazers_url":"https://api.github.com/repos/docker/docker/stargazers","contributors_url":"https://api.github.com/repos/docker/docker/contributors","subscribers_url":"https://api.github.com/repos/docker/docker/subscribers","subscription_url":"https://api.github.com/repos/docker/docker/subscription","commits_url":"https://api.github.com/repos/docker/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/docker/contents/{+path}","compare_url":"https://api.github.com/repos/docker/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/docker/merges","archive_url":"https://api.github.com/repos/docker/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/docker/downloads","issues_url":"https://api.github.com/repos/docker/docker/issues{/number}","pulls_url":"https://api.github.com/repos/docker/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/docker/labels{/name}","releases_url":"https://api.github.com/repos/docker/docker/releases{/id}","deployments_url":"https://api.github.com/repos/docker/docker/deployments","created_at":"2013-01-18T18:10:57Z","updated_at":"2016-07-13T17:52:44Z","pushed_at":"2016-07-13T18:39:31Z","git_url":"git://github.com/docker/docker.git","ssh_url":"git@github.com:docker/docker.git","clone_url":"https://github.com/docker/docker.git","svn_url":"https://github.com/docker/docker","homepage":"http://www.docker.com","size":204572,"stargazers_count":32966,"watchers_count":32966,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9536,"mirror_url":null,"open_issues_count":1951,"forks":9536,"open_issues":1951,"watchers":32966,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/24568"},"html":{"href":"https://github.com/docker/docker/pull/24568"},"issue":{"href":"https://api.github.com/repos/docker/docker/issues/24568"},"comments":{"href":"https://api.github.com/repos/docker/docker/issues/24568/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/docker/pulls/24568/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/docker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/docker/pulls/24568/commits"},"statuses":{"href":"https://api.github.com/repos/docker/docker/statuses/94515c9cb37452733c3e22b4d63b4c6e604b7847"}}}}
{"actor":{"display_login":"dmcgowan"}}