{"action":"created","issue":{"url":"https://api.github.com/repos/zfcampus/zf-mvc-auth/issues/56","labels_url":"https://api.github.com/repos/zfcampus/zf-mvc-auth/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/zfcampus/zf-mvc-auth/issues/56/comments","events_url":"https://api.github.com/repos/zfcampus/zf-mvc-auth/issues/56/events","html_url":"https://github.com/zfcampus/zf-mvc-auth/pull/56","id":57306104,"number":56,"title":"Code cleaning","user":{"login":"stefanotorresi","id":2952427,"avatar_url":"https://avatars.githubusercontent.com/u/2952427?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanotorresi","html_url":"https://github.com/stefanotorresi","followers_url":"https://api.github.com/users/stefanotorresi/followers","following_url":"https://api.github.com/users/stefanotorresi/following{/other_user}","gists_url":"https://api.github.com/users/stefanotorresi/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanotorresi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanotorresi/subscriptions","organizations_url":"https://api.github.com/users/stefanotorresi/orgs","repos_url":"https://api.github.com/users/stefanotorresi/repos","events_url":"https://api.github.com/users/stefanotorresi/events{/privacy}","received_events_url":"https://api.github.com/users/stefanotorresi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-11T11:47:38Z","updated_at":"2015-03-30T17:05:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/zfcampus/zf-mvc-auth/pulls/56","html_url":"https://github.com/zfcampus/zf-mvc-auth/pull/56","diff_url":"https://github.com/zfcampus/zf-mvc-auth/pull/56.diff","patch_url":"https://github.com/zfcampus/zf-mvc-auth/pull/56.patch"},"body":"@weierophinney I'd like to take the opportunity to note that the api of the `MvcAuthEvent` is a bit confusing. `setIdentity()` assumes a concrete `Zend\\Authentication\\AuthenticationService` instance is composed, but the if we add the typehint the tests will fail because an invalid mock is used. Also it is not clear what `$authorization` can be. I've found myself using expecting an `ZF\\MvcAuth\\Authorization\\AuthorizationInterface` and instead it was a `Zend\\Permissions\\Acl\\Acl`.\r\n\r\nI know that these problems all involve BC breaks, but I'd really like to have a more consistent API throughout the whole module: it has some rough edges and working with it has not been the most pleasant of the tasks. :-P\r\n\r\nCould you give me some insights on what would you change?"},"comment":{"url":"https://api.github.com/repos/zfcampus/zf-mvc-auth/issues/comments/87752748","html_url":"https://github.com/zfcampus/zf-mvc-auth/pull/56#issuecomment-87752748","issue_url":"https://api.github.com/repos/zfcampus/zf-mvc-auth/issues/56","id":87752748,"user":{"login":"weierophinney","id":25943,"avatar_url":"https://avatars.githubusercontent.com/u/25943?v=3","gravatar_id":"","url":"https://api.github.com/users/weierophinney","html_url":"https://github.com/weierophinney","followers_url":"https://api.github.com/users/weierophinney/followers","following_url":"https://api.github.com/users/weierophinney/following{/other_user}","gists_url":"https://api.github.com/users/weierophinney/gists{/gist_id}","starred_url":"https://api.github.com/users/weierophinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weierophinney/subscriptions","organizations_url":"https://api.github.com/users/weierophinney/orgs","repos_url":"https://api.github.com/users/weierophinney/repos","events_url":"https://api.github.com/users/weierophinney/events{/privacy}","received_events_url":"https://api.github.com/users/weierophinney/received_events","type":"User","site_admin":false},"created_at":"2015-03-30T17:05:50Z","updated_at":"2015-03-30T17:05:50Z","body":"The vision originally was to allow a user to specify whatever authentication or authorization service they want, and then, via their custom listener, use that service to authenticate or authorize an identity. In reality, the better practice is to inject the listener with the service to use. As such, these elements of the MvcAuthEvent and default listeners should be refactored. Does that answer your question or give you any direction, @stefanotorresi ?"}}