{"action":"opened","number":26,"pull_request":{"url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/pulls/26","id":52143319,"html_url":"https://github.com/biberlabs/zf2-boilerplate/pull/26","diff_url":"https://github.com/biberlabs/zf2-boilerplate/pull/26.diff","patch_url":"https://github.com/biberlabs/zf2-boilerplate/pull/26.patch","issue_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/issues/26","number":26,"state":"open","locked":false,"title":"Yet another OAuth integration with identity injected into Resources ","user":{"login":"hkulekci","id":586318,"avatar_url":"https://avatars.githubusercontent.com/u/586318?v=3","gravatar_id":"","url":"https://api.github.com/users/hkulekci","html_url":"https://github.com/hkulekci","followers_url":"https://api.github.com/users/hkulekci/followers","following_url":"https://api.github.com/users/hkulekci/following{/other_user}","gists_url":"https://api.github.com/users/hkulekci/gists{/gist_id}","starred_url":"https://api.github.com/users/hkulekci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hkulekci/subscriptions","organizations_url":"https://api.github.com/users/hkulekci/orgs","repos_url":"https://api.github.com/users/hkulekci/repos","events_url":"https://api.github.com/users/hkulekci/events{/privacy}","received_events_url":"https://api.github.com/users/hkulekci/received_events","type":"User","site_admin":false},"body":"There are a problem other pull request about manipulated identity. Manipulated identity information did not change on resources get Identity information. Because MvcEvent save their own identity information in its params attributes. And it is not update self identity information when MvcAuthEvent identity information manipulated. Check only following lines\r\n\r\n```diff\r\n+    public function eventAuthenticationPost(MvcAuthEvent $event)\r\n+    {\r\n+        $identity      = $event->getIdentity();\r\n+        $oauth2Closure = $event->getMvcEvent()\r\n+                               ->getApplication()\r\n+                               ->getServiceManager()\r\n+                               ->get(\\ZF\\OAuth2\\Service\\OAuth2Server::class);\r\n+\r\n+        if (!!$identity) {\r\n+            $userData = $oauth2Closure()->getStorage('user_credentials')->getUser($identity->getName());\r\n+            \r\n+            $identity = new \\ZF\\MvcAuth\\Identity\\AuthenticatedIdentity($userData);\r\n+            $event->setIdentity($identity);\r\n+            //MvcEvent did not understand when manipulated MvcAuthEvent identity\r\n+            $event->getMvcEvent()->setParam('ZF\\MvcAuth\\Identity', $identity);\r\n+        }\r\n+\r\n+        return $event;\r\n+    }\r\n```","created_at":"2015-11-30T16:10:14Z","updated_at":"2015-11-30T16:10:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/pulls/26/commits","review_comments_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/pulls/26/comments","review_comment_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/issues/26/comments","statuses_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/statuses/a1a82cc007ed9700c6441ff0401866269bf77d99","head":{"label":"hkulekci:feature/oauth-identity-integration","ref":"feature/oauth-identity-integration","sha":"a1a82cc007ed9700c6441ff0401866269bf77d99","user":{"login":"hkulekci","id":586318,"avatar_url":"https://avatars.githubusercontent.com/u/586318?v=3","gravatar_id":"","url":"https://api.github.com/users/hkulekci","html_url":"https://github.com/hkulekci","followers_url":"https://api.github.com/users/hkulekci/followers","following_url":"https://api.github.com/users/hkulekci/following{/other_user}","gists_url":"https://api.github.com/users/hkulekci/gists{/gist_id}","starred_url":"https://api.github.com/users/hkulekci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hkulekci/subscriptions","organizations_url":"https://api.github.com/users/hkulekci/orgs","repos_url":"https://api.github.com/users/hkulekci/repos","events_url":"https://api.github.com/users/hkulekci/events{/privacy}","received_events_url":"https://api.github.com/users/hkulekci/received_events","type":"User","site_admin":false},"repo":{"id":39161821,"name":"zf2-boilerplate","full_name":"hkulekci/zf2-boilerplate","owner":{"login":"hkulekci","id":586318,"avatar_url":"https://avatars.githubusercontent.com/u/586318?v=3","gravatar_id":"","url":"https://api.github.com/users/hkulekci","html_url":"https://github.com/hkulekci","followers_url":"https://api.github.com/users/hkulekci/followers","following_url":"https://api.github.com/users/hkulekci/following{/other_user}","gists_url":"https://api.github.com/users/hkulekci/gists{/gist_id}","starred_url":"https://api.github.com/users/hkulekci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hkulekci/subscriptions","organizations_url":"https://api.github.com/users/hkulekci/orgs","repos_url":"https://api.github.com/users/hkulekci/repos","events_url":"https://api.github.com/users/hkulekci/events{/privacy}","received_events_url":"https://api.github.com/users/hkulekci/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hkulekci/zf2-boilerplate","description":"","fork":true,"url":"https://api.github.com/repos/hkulekci/zf2-boilerplate","forks_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/forks","keys_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/teams","hooks_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/hooks","issue_events_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/issues/events{/number}","events_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/events","assignees_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/assignees{/user}","branches_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/branches{/branch}","tags_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/tags","blobs_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/git/refs{/sha}","trees_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/statuses/{sha}","languages_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/languages","stargazers_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/stargazers","contributors_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/contributors","subscribers_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/subscribers","subscription_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/subscription","commits_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/commits{/sha}","git_commits_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/git/commits{/sha}","comments_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/comments{/number}","issue_comment_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/issues/comments{/number}","contents_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/contents/{+path}","compare_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/merges","archive_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/downloads","issues_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/issues{/number}","pulls_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/pulls{/number}","milestones_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/milestones{/number}","notifications_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/labels{/name}","releases_url":"https://api.github.com/repos/hkulekci/zf2-boilerplate/releases{/id}","created_at":"2015-07-15T21:18:35Z","updated_at":"2015-07-16T07:18:13Z","pushed_at":"2015-11-30T16:06:01Z","git_url":"git://github.com/hkulekci/zf2-boilerplate.git","ssh_url":"git@github.com:hkulekci/zf2-boilerplate.git","clone_url":"https://github.com/hkulekci/zf2-boilerplate.git","svn_url":"https://github.com/hkulekci/zf2-boilerplate","homepage":null,"size":924,"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":"biberlabs:master","ref":"master","sha":"d8498fa75436215869a76aad238b57a34b833716","user":{"login":"biberlabs","id":15942532,"avatar_url":"https://avatars.githubusercontent.com/u/15942532?v=3","gravatar_id":"","url":"https://api.github.com/users/biberlabs","html_url":"https://github.com/biberlabs","followers_url":"https://api.github.com/users/biberlabs/followers","following_url":"https://api.github.com/users/biberlabs/following{/other_user}","gists_url":"https://api.github.com/users/biberlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/biberlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biberlabs/subscriptions","organizations_url":"https://api.github.com/users/biberlabs/orgs","repos_url":"https://api.github.com/users/biberlabs/repos","events_url":"https://api.github.com/users/biberlabs/events{/privacy}","received_events_url":"https://api.github.com/users/biberlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":39158236,"name":"zf2-boilerplate","full_name":"biberlabs/zf2-boilerplate","owner":{"login":"biberlabs","id":15942532,"avatar_url":"https://avatars.githubusercontent.com/u/15942532?v=3","gravatar_id":"","url":"https://api.github.com/users/biberlabs","html_url":"https://github.com/biberlabs","followers_url":"https://api.github.com/users/biberlabs/followers","following_url":"https://api.github.com/users/biberlabs/following{/other_user}","gists_url":"https://api.github.com/users/biberlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/biberlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biberlabs/subscriptions","organizations_url":"https://api.github.com/users/biberlabs/orgs","repos_url":"https://api.github.com/users/biberlabs/repos","events_url":"https://api.github.com/users/biberlabs/events{/privacy}","received_events_url":"https://api.github.com/users/biberlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/biberlabs/zf2-boilerplate","description":"Unofficial & enhanced skeleton application for ZF2","fork":false,"url":"https://api.github.com/repos/biberlabs/zf2-boilerplate","forks_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/forks","keys_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/teams","hooks_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/hooks","issue_events_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/issues/events{/number}","events_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/events","assignees_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/assignees{/user}","branches_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/branches{/branch}","tags_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/tags","blobs_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/git/refs{/sha}","trees_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/statuses/{sha}","languages_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/languages","stargazers_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/stargazers","contributors_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/contributors","subscribers_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/subscribers","subscription_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/subscription","commits_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/commits{/sha}","git_commits_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/git/commits{/sha}","comments_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/comments{/number}","issue_comment_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/issues/comments{/number}","contents_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/contents/{+path}","compare_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/merges","archive_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/downloads","issues_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/issues{/number}","pulls_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/pulls{/number}","milestones_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/milestones{/number}","notifications_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/labels{/name}","releases_url":"https://api.github.com/repos/biberlabs/zf2-boilerplate/releases{/id}","created_at":"2015-07-15T20:00:02Z","updated_at":"2015-11-20T14:24:09Z","pushed_at":"2015-11-28T11:03:51Z","git_url":"git://github.com/biberlabs/zf2-boilerplate.git","ssh_url":"git@github.com:biberlabs/zf2-boilerplate.git","clone_url":"https://github.com/biberlabs/zf2-boilerplate.git","svn_url":"https://github.com/biberlabs/zf2-boilerplate","homepage":"","size":925,"stargazers_count":4,"watchers_count":4,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":11,"forks":5,"open_issues":11,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biberlabs/zf2-boilerplate/pulls/26"},"html":{"href":"https://github.com/biberlabs/zf2-boilerplate/pull/26"},"issue":{"href":"https://api.github.com/repos/biberlabs/zf2-boilerplate/issues/26"},"comments":{"href":"https://api.github.com/repos/biberlabs/zf2-boilerplate/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/biberlabs/zf2-boilerplate/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/biberlabs/zf2-boilerplate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/biberlabs/zf2-boilerplate/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/biberlabs/zf2-boilerplate/statuses/a1a82cc007ed9700c6441ff0401866269bf77d99"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":5,"additions":472,"deletions":16,"changed_files":15}}