{"action":"created","comment":{"url":"https://api.github.com/repos/thephpleague/oauth2-client/pulls/comments/26154688","id":26154688,"diff_hunk":"@@ -323,17 +325,19 @@ protected function fetchUserDetails(AccessToken $token)\n     {\n         $url = $this->urlUserDetails($token);\n \n-        return $this->fetchProviderData($url);\n+        $headers = $this->getHeaders($token);\n+\n+        return $this->fetchProviderData($url, $headers);\n     }\n \n-    protected function fetchProviderData($url)\n+    protected function fetchProviderData($url, array $headers)","path":"src/Provider/AbstractProvider.php","position":22,"original_position":22,"commit_id":"c76bc96c9688b0e653fbd9df4985e81a37c14238","original_commit_id":"c76bc96c9688b0e653fbd9df4985e81a37c14238","user":{"login":"ramsey","id":42941,"avatar_url":"https://avatars.githubusercontent.com/u/42941?v=3","gravatar_id":"","url":"https://api.github.com/users/ramsey","html_url":"https://github.com/ramsey","followers_url":"https://api.github.com/users/ramsey/followers","following_url":"https://api.github.com/users/ramsey/following{/other_user}","gists_url":"https://api.github.com/users/ramsey/gists{/gist_id}","starred_url":"https://api.github.com/users/ramsey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramsey/subscriptions","organizations_url":"https://api.github.com/users/ramsey/orgs","repos_url":"https://api.github.com/users/ramsey/repos","events_url":"https://api.github.com/users/ramsey/events{/privacy}","received_events_url":"https://api.github.com/users/ramsey/received_events","type":"User","site_admin":false},"body":"Should we considering initializing this to a default value in case any providers in the wild are calling the `fetchProviderData()` method? Perhaps something as simple as this:\r\n\r\n    protected function fetchProviderData($url, array $headers = [])","created_at":"2015-03-10T19:05:03Z","updated_at":"2015-03-10T19:05:03Z","html_url":"https://github.com/thephpleague/oauth2-client/pull/232#discussion_r26154688","pull_request_url":"https://api.github.com/repos/thephpleague/oauth2-client/pulls/232","_links":{"self":{"href":"https://api.github.com/repos/thephpleague/oauth2-client/pulls/comments/26154688"},"html":{"href":"https://github.com/thephpleague/oauth2-client/pull/232#discussion_r26154688"},"pull_request":{"href":"https://api.github.com/repos/thephpleague/oauth2-client/pulls/232"}}},"pull_request":{"url":"https://api.github.com/repos/thephpleague/oauth2-client/pulls/232","id":30244971,"html_url":"https://github.com/thephpleague/oauth2-client/pull/232","diff_url":"https://github.com/thephpleague/oauth2-client/pull/232.diff","patch_url":"https://github.com/thephpleague/oauth2-client/pull/232.patch","issue_url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/232","number":232,"state":"open","locked":false,"title":"Enhance ability to use client to make authenticated requests","user":{"login":"shadowhand","id":38203,"avatar_url":"https://avatars.githubusercontent.com/u/38203?v=3","gravatar_id":"","url":"https://api.github.com/users/shadowhand","html_url":"https://github.com/shadowhand","followers_url":"https://api.github.com/users/shadowhand/followers","following_url":"https://api.github.com/users/shadowhand/following{/other_user}","gists_url":"https://api.github.com/users/shadowhand/gists{/gist_id}","starred_url":"https://api.github.com/users/shadowhand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shadowhand/subscriptions","organizations_url":"https://api.github.com/users/shadowhand/orgs","repos_url":"https://api.github.com/users/shadowhand/repos","events_url":"https://api.github.com/users/shadowhand/events{/privacy}","received_events_url":"https://api.github.com/users/shadowhand/received_events","type":"User","site_admin":false},"body":"- add `ProviderInterface::getHeaders()`\n- use `getHeaders()` for `fetchUserDetails()`\n\nSome providers do not provide a method for using query strings to send tokens.\nBy adding hooks for headers, the provider can be used to sign API requests,\nincluding POST requests.","created_at":"2015-03-01T17:13:02Z","updated_at":"2015-03-10T19:05:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8484fadd2e17a8262fe057dfeb7d478ad5a5b76a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thephpleague/oauth2-client/pulls/232/commits","review_comments_url":"https://api.github.com/repos/thephpleague/oauth2-client/pulls/232/comments","review_comment_url":"https://api.github.com/repos/thephpleague/oauth2-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/232/comments","statuses_url":"https://api.github.com/repos/thephpleague/oauth2-client/statuses/c76bc96c9688b0e653fbd9df4985e81a37c14238","head":{"label":"shadowhand:provider-get-headers","ref":"provider-get-headers","sha":"c76bc96c9688b0e653fbd9df4985e81a37c14238","user":{"login":"shadowhand","id":38203,"avatar_url":"https://avatars.githubusercontent.com/u/38203?v=3","gravatar_id":"","url":"https://api.github.com/users/shadowhand","html_url":"https://github.com/shadowhand","followers_url":"https://api.github.com/users/shadowhand/followers","following_url":"https://api.github.com/users/shadowhand/following{/other_user}","gists_url":"https://api.github.com/users/shadowhand/gists{/gist_id}","starred_url":"https://api.github.com/users/shadowhand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shadowhand/subscriptions","organizations_url":"https://api.github.com/users/shadowhand/orgs","repos_url":"https://api.github.com/users/shadowhand/repos","events_url":"https://api.github.com/users/shadowhand/events{/privacy}","received_events_url":"https://api.github.com/users/shadowhand/received_events","type":"User","site_admin":false},"repo":{"id":31221950,"name":"oauth2-client","full_name":"shadowhand/oauth2-client","owner":{"login":"shadowhand","id":38203,"avatar_url":"https://avatars.githubusercontent.com/u/38203?v=3","gravatar_id":"","url":"https://api.github.com/users/shadowhand","html_url":"https://github.com/shadowhand","followers_url":"https://api.github.com/users/shadowhand/followers","following_url":"https://api.github.com/users/shadowhand/following{/other_user}","gists_url":"https://api.github.com/users/shadowhand/gists{/gist_id}","starred_url":"https://api.github.com/users/shadowhand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shadowhand/subscriptions","organizations_url":"https://api.github.com/users/shadowhand/orgs","repos_url":"https://api.github.com/users/shadowhand/repos","events_url":"https://api.github.com/users/shadowhand/events{/privacy}","received_events_url":"https://api.github.com/users/shadowhand/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shadowhand/oauth2-client","description":"Making it simple to integrate your application with OAuth 2.0 identity providers.","fork":true,"url":"https://api.github.com/repos/shadowhand/oauth2-client","forks_url":"https://api.github.com/repos/shadowhand/oauth2-client/forks","keys_url":"https://api.github.com/repos/shadowhand/oauth2-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shadowhand/oauth2-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shadowhand/oauth2-client/teams","hooks_url":"https://api.github.com/repos/shadowhand/oauth2-client/hooks","issue_events_url":"https://api.github.com/repos/shadowhand/oauth2-client/issues/events{/number}","events_url":"https://api.github.com/repos/shadowhand/oauth2-client/events","assignees_url":"https://api.github.com/repos/shadowhand/oauth2-client/assignees{/user}","branches_url":"https://api.github.com/repos/shadowhand/oauth2-client/branches{/branch}","tags_url":"https://api.github.com/repos/shadowhand/oauth2-client/tags","blobs_url":"https://api.github.com/repos/shadowhand/oauth2-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shadowhand/oauth2-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shadowhand/oauth2-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/shadowhand/oauth2-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shadowhand/oauth2-client/statuses/{sha}","languages_url":"https://api.github.com/repos/shadowhand/oauth2-client/languages","stargazers_url":"https://api.github.com/repos/shadowhand/oauth2-client/stargazers","contributors_url":"https://api.github.com/repos/shadowhand/oauth2-client/contributors","subscribers_url":"https://api.github.com/repos/shadowhand/oauth2-client/subscribers","subscription_url":"https://api.github.com/repos/shadowhand/oauth2-client/subscription","commits_url":"https://api.github.com/repos/shadowhand/oauth2-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/shadowhand/oauth2-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/shadowhand/oauth2-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/shadowhand/oauth2-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/shadowhand/oauth2-client/contents/{+path}","compare_url":"https://api.github.com/repos/shadowhand/oauth2-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shadowhand/oauth2-client/merges","archive_url":"https://api.github.com/repos/shadowhand/oauth2-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shadowhand/oauth2-client/downloads","issues_url":"https://api.github.com/repos/shadowhand/oauth2-client/issues{/number}","pulls_url":"https://api.github.com/repos/shadowhand/oauth2-client/pulls{/number}","milestones_url":"https://api.github.com/repos/shadowhand/oauth2-client/milestones{/number}","notifications_url":"https://api.github.com/repos/shadowhand/oauth2-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shadowhand/oauth2-client/labels{/name}","releases_url":"https://api.github.com/repos/shadowhand/oauth2-client/releases{/id}","created_at":"2015-02-23T18:15:31Z","updated_at":"2015-02-23T18:15:32Z","pushed_at":"2015-03-01T17:58:12Z","git_url":"git://github.com/shadowhand/oauth2-client.git","ssh_url":"git@github.com:shadowhand/oauth2-client.git","clone_url":"https://github.com/shadowhand/oauth2-client.git","svn_url":"https://github.com/shadowhand/oauth2-client","homepage":"","size":462,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"thephpleague:master","ref":"master","sha":"a86dbd4e582acb2e6fb78cec68923dc27c26f86c","user":{"login":"thephpleague","id":527621,"avatar_url":"https://avatars.githubusercontent.com/u/527621?v=3","gravatar_id":"","url":"https://api.github.com/users/thephpleague","html_url":"https://github.com/thephpleague","followers_url":"https://api.github.com/users/thephpleague/followers","following_url":"https://api.github.com/users/thephpleague/following{/other_user}","gists_url":"https://api.github.com/users/thephpleague/gists{/gist_id}","starred_url":"https://api.github.com/users/thephpleague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thephpleague/subscriptions","organizations_url":"https://api.github.com/users/thephpleague/orgs","repos_url":"https://api.github.com/users/thephpleague/repos","events_url":"https://api.github.com/users/thephpleague/events{/privacy}","received_events_url":"https://api.github.com/users/thephpleague/received_events","type":"Organization","site_admin":false},"repo":{"id":7895524,"name":"oauth2-client","full_name":"thephpleague/oauth2-client","owner":{"login":"thephpleague","id":527621,"avatar_url":"https://avatars.githubusercontent.com/u/527621?v=3","gravatar_id":"","url":"https://api.github.com/users/thephpleague","html_url":"https://github.com/thephpleague","followers_url":"https://api.github.com/users/thephpleague/followers","following_url":"https://api.github.com/users/thephpleague/following{/other_user}","gists_url":"https://api.github.com/users/thephpleague/gists{/gist_id}","starred_url":"https://api.github.com/users/thephpleague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thephpleague/subscriptions","organizations_url":"https://api.github.com/users/thephpleague/orgs","repos_url":"https://api.github.com/users/thephpleague/repos","events_url":"https://api.github.com/users/thephpleague/events{/privacy}","received_events_url":"https://api.github.com/users/thephpleague/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thephpleague/oauth2-client","description":"Making it simple to integrate your application with OAuth 2.0 identity providers.","fork":false,"url":"https://api.github.com/repos/thephpleague/oauth2-client","forks_url":"https://api.github.com/repos/thephpleague/oauth2-client/forks","keys_url":"https://api.github.com/repos/thephpleague/oauth2-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thephpleague/oauth2-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thephpleague/oauth2-client/teams","hooks_url":"https://api.github.com/repos/thephpleague/oauth2-client/hooks","issue_events_url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/events{/number}","events_url":"https://api.github.com/repos/thephpleague/oauth2-client/events","assignees_url":"https://api.github.com/repos/thephpleague/oauth2-client/assignees{/user}","branches_url":"https://api.github.com/repos/thephpleague/oauth2-client/branches{/branch}","tags_url":"https://api.github.com/repos/thephpleague/oauth2-client/tags","blobs_url":"https://api.github.com/repos/thephpleague/oauth2-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thephpleague/oauth2-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thephpleague/oauth2-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/thephpleague/oauth2-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thephpleague/oauth2-client/statuses/{sha}","languages_url":"https://api.github.com/repos/thephpleague/oauth2-client/languages","stargazers_url":"https://api.github.com/repos/thephpleague/oauth2-client/stargazers","contributors_url":"https://api.github.com/repos/thephpleague/oauth2-client/contributors","subscribers_url":"https://api.github.com/repos/thephpleague/oauth2-client/subscribers","subscription_url":"https://api.github.com/repos/thephpleague/oauth2-client/subscription","commits_url":"https://api.github.com/repos/thephpleague/oauth2-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/thephpleague/oauth2-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/thephpleague/oauth2-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/thephpleague/oauth2-client/contents/{+path}","compare_url":"https://api.github.com/repos/thephpleague/oauth2-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thephpleague/oauth2-client/merges","archive_url":"https://api.github.com/repos/thephpleague/oauth2-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thephpleague/oauth2-client/downloads","issues_url":"https://api.github.com/repos/thephpleague/oauth2-client/issues{/number}","pulls_url":"https://api.github.com/repos/thephpleague/oauth2-client/pulls{/number}","milestones_url":"https://api.github.com/repos/thephpleague/oauth2-client/milestones{/number}","notifications_url":"https://api.github.com/repos/thephpleague/oauth2-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thephpleague/oauth2-client/labels{/name}","releases_url":"https://api.github.com/repos/thephpleague/oauth2-client/releases{/id}","created_at":"2013-01-29T16:01:42Z","updated_at":"2015-03-10T19:02:05Z","pushed_at":"2015-03-10T19:02:05Z","git_url":"git://github.com/thephpleague/oauth2-client.git","ssh_url":"git@github.com:thephpleague/oauth2-client.git","clone_url":"https://github.com/thephpleague/oauth2-client.git","svn_url":"https://github.com/thephpleague/oauth2-client","homepage":"","size":1942,"stargazers_count":674,"watchers_count":674,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":207,"mirror_url":null,"open_issues_count":14,"forks":207,"open_issues":14,"watchers":674,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thephpleague/oauth2-client/pulls/232"},"html":{"href":"https://github.com/thephpleague/oauth2-client/pull/232"},"issue":{"href":"https://api.github.com/repos/thephpleague/oauth2-client/issues/232"},"comments":{"href":"https://api.github.com/repos/thephpleague/oauth2-client/issues/232/comments"},"review_comments":{"href":"https://api.github.com/repos/thephpleague/oauth2-client/pulls/232/comments"},"review_comment":{"href":"https://api.github.com/repos/thephpleague/oauth2-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thephpleague/oauth2-client/pulls/232/commits"},"statuses":{"href":"https://api.github.com/repos/thephpleague/oauth2-client/statuses/c76bc96c9688b0e653fbd9df4985e81a37c14238"}}}}