{"action":"opened","number":380,"pull_request":{"url":"https://api.github.com/repos/thephpleague/oauth2-client/pulls/380","id":39753138,"html_url":"https://github.com/thephpleague/oauth2-client/pull/380","diff_url":"https://github.com/thephpleague/oauth2-client/pull/380.diff","patch_url":"https://github.com/thephpleague/oauth2-client/pull/380.patch","issue_url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/380","number":380,"state":"open","locked":false,"title":"Storing the Provider Response in a class attribute","user":{"login":"ssnukala","id":5246509,"avatar_url":"https://avatars.githubusercontent.com/u/5246509?v=3","gravatar_id":"","url":"https://api.github.com/users/ssnukala","html_url":"https://github.com/ssnukala","followers_url":"https://api.github.com/users/ssnukala/followers","following_url":"https://api.github.com/users/ssnukala/following{/other_user}","gists_url":"https://api.github.com/users/ssnukala/gists{/gist_id}","starred_url":"https://api.github.com/users/ssnukala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssnukala/subscriptions","organizations_url":"https://api.github.com/users/ssnukala/orgs","repos_url":"https://api.github.com/users/ssnukala/repos","events_url":"https://api.github.com/users/ssnukala/events{/privacy}","received_events_url":"https://api.github.com/users/ssnukala/received_events","type":"User","site_admin":false},"body":"Would like to propose storing the response in a class attribute, so\r\nthat if we configure the OAuth to get additional information than the\r\nUser Object has, then this attribute can be used to get that\r\ninformation. For instance I was trying to get “summary” and “Compaines”\r\nfields from LinkedIn, I am able to set $fields to include that in the\r\ncall to linked in but the return object only returns the User object\r\nand that does not have all the fields. So providing a way to access the\r\nactual response received would be good so that users can use this\r\nextended information.\r\n\r\nI am using something like this\r\n\r\n        $oaFields = ['id', 'email-address', 'first-name', 'last-name', 'headline',\r\n        'location', 'industry', 'picture-url', 'public-profile-url','summary','specialties','positions'];\r\n\r\n        $this->_provider = new \\League\\OAuth2\\Client\\Provider\\LinkedIn([\r\n            'clientId' => $clientId,\r\n            'clientSecret' => $clientSecret,\r\n            'redirectUri' => $this->_app->site->uri['public'] . \"/oauth/linkedin/$callback_page\",\r\n            'scopes' => $scopes]);\r\n        $this->_provider->fields=$oaFields;\r\n\r\nSo even though the fetchUserDetails gets all the data from LinkedIn the User object does not pass all this back. ","created_at":"2015-07-11T22:12:23Z","updated_at":"2015-07-11T22:12:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thephpleague/oauth2-client/pulls/380/commits","review_comments_url":"https://api.github.com/repos/thephpleague/oauth2-client/pulls/380/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/380/comments","statuses_url":"https://api.github.com/repos/thephpleague/oauth2-client/statuses/39f6bf39b862bd723869032b3a9f50c0de8b1a2f","head":{"label":"ssnukala:0.12.x","ref":"0.12.x","sha":"39f6bf39b862bd723869032b3a9f50c0de8b1a2f","user":{"login":"ssnukala","id":5246509,"avatar_url":"https://avatars.githubusercontent.com/u/5246509?v=3","gravatar_id":"","url":"https://api.github.com/users/ssnukala","html_url":"https://github.com/ssnukala","followers_url":"https://api.github.com/users/ssnukala/followers","following_url":"https://api.github.com/users/ssnukala/following{/other_user}","gists_url":"https://api.github.com/users/ssnukala/gists{/gist_id}","starred_url":"https://api.github.com/users/ssnukala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssnukala/subscriptions","organizations_url":"https://api.github.com/users/ssnukala/orgs","repos_url":"https://api.github.com/users/ssnukala/repos","events_url":"https://api.github.com/users/ssnukala/events{/privacy}","received_events_url":"https://api.github.com/users/ssnukala/received_events","type":"User","site_admin":false},"repo":{"id":37759782,"name":"oauth2-client","full_name":"ssnukala/oauth2-client","owner":{"login":"ssnukala","id":5246509,"avatar_url":"https://avatars.githubusercontent.com/u/5246509?v=3","gravatar_id":"","url":"https://api.github.com/users/ssnukala","html_url":"https://github.com/ssnukala","followers_url":"https://api.github.com/users/ssnukala/followers","following_url":"https://api.github.com/users/ssnukala/following{/other_user}","gists_url":"https://api.github.com/users/ssnukala/gists{/gist_id}","starred_url":"https://api.github.com/users/ssnukala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssnukala/subscriptions","organizations_url":"https://api.github.com/users/ssnukala/orgs","repos_url":"https://api.github.com/users/ssnukala/repos","events_url":"https://api.github.com/users/ssnukala/events{/privacy}","received_events_url":"https://api.github.com/users/ssnukala/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ssnukala/oauth2-client","description":"Making it simple to integrate your application with OAuth 2.0 identity providers.","fork":true,"url":"https://api.github.com/repos/ssnukala/oauth2-client","forks_url":"https://api.github.com/repos/ssnukala/oauth2-client/forks","keys_url":"https://api.github.com/repos/ssnukala/oauth2-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ssnukala/oauth2-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ssnukala/oauth2-client/teams","hooks_url":"https://api.github.com/repos/ssnukala/oauth2-client/hooks","issue_events_url":"https://api.github.com/repos/ssnukala/oauth2-client/issues/events{/number}","events_url":"https://api.github.com/repos/ssnukala/oauth2-client/events","assignees_url":"https://api.github.com/repos/ssnukala/oauth2-client/assignees{/user}","branches_url":"https://api.github.com/repos/ssnukala/oauth2-client/branches{/branch}","tags_url":"https://api.github.com/repos/ssnukala/oauth2-client/tags","blobs_url":"https://api.github.com/repos/ssnukala/oauth2-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ssnukala/oauth2-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ssnukala/oauth2-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/ssnukala/oauth2-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ssnukala/oauth2-client/statuses/{sha}","languages_url":"https://api.github.com/repos/ssnukala/oauth2-client/languages","stargazers_url":"https://api.github.com/repos/ssnukala/oauth2-client/stargazers","contributors_url":"https://api.github.com/repos/ssnukala/oauth2-client/contributors","subscribers_url":"https://api.github.com/repos/ssnukala/oauth2-client/subscribers","subscription_url":"https://api.github.com/repos/ssnukala/oauth2-client/subscription","commits_url":"https://api.github.com/repos/ssnukala/oauth2-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/ssnukala/oauth2-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/ssnukala/oauth2-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/ssnukala/oauth2-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/ssnukala/oauth2-client/contents/{+path}","compare_url":"https://api.github.com/repos/ssnukala/oauth2-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ssnukala/oauth2-client/merges","archive_url":"https://api.github.com/repos/ssnukala/oauth2-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ssnukala/oauth2-client/downloads","issues_url":"https://api.github.com/repos/ssnukala/oauth2-client/issues{/number}","pulls_url":"https://api.github.com/repos/ssnukala/oauth2-client/pulls{/number}","milestones_url":"https://api.github.com/repos/ssnukala/oauth2-client/milestones{/number}","notifications_url":"https://api.github.com/repos/ssnukala/oauth2-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ssnukala/oauth2-client/labels{/name}","releases_url":"https://api.github.com/repos/ssnukala/oauth2-client/releases{/id}","created_at":"2015-06-20T06:02:29Z","updated_at":"2015-06-20T06:02:30Z","pushed_at":"2015-07-11T22:08:33Z","git_url":"git://github.com/ssnukala/oauth2-client.git","ssh_url":"git@github.com:ssnukala/oauth2-client.git","clone_url":"https://github.com/ssnukala/oauth2-client.git","svn_url":"https://github.com/ssnukala/oauth2-client","homepage":"","size":610,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"0.12.x"}},"base":{"label":"thephpleague:0.12.x","ref":"0.12.x","sha":"670ec6e743f5c95441263440afcdabc3fc720547","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-07-11T10:11:37Z","pushed_at":"2015-07-09T15:02:46Z","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":2800,"stargazers_count":838,"watchers_count":838,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":267,"mirror_url":null,"open_issues_count":8,"forks":267,"open_issues":8,"watchers":838,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thephpleague/oauth2-client/pulls/380"},"html":{"href":"https://github.com/thephpleague/oauth2-client/pull/380"},"issue":{"href":"https://api.github.com/repos/thephpleague/oauth2-client/issues/380"},"comments":{"href":"https://api.github.com/repos/thephpleague/oauth2-client/issues/380/comments"},"review_comments":{"href":"https://api.github.com/repos/thephpleague/oauth2-client/pulls/380/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/380/commits"},"statuses":{"href":"https://api.github.com/repos/thephpleague/oauth2-client/statuses/39f6bf39b862bd723869032b3a9f50c0de8b1a2f"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":4,"deletions":0,"changed_files":2}}