{"action":"created","issue":{"url":"https://api.github.com/repos/sparkphp/Spark/issues/10","labels_url":"https://api.github.com/repos/sparkphp/Spark/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/sparkphp/Spark/issues/10/comments","events_url":"https://api.github.com/repos/sparkphp/Spark/issues/10/events","html_url":"https://github.com/sparkphp/Spark/issues/10","id":84327606,"number":10,"title":"Add a Middleware Component","user":{"login":"dolfelt","id":202546,"avatar_url":"https://avatars.githubusercontent.com/u/202546?v=3","gravatar_id":"","url":"https://api.github.com/users/dolfelt","html_url":"https://github.com/dolfelt","followers_url":"https://api.github.com/users/dolfelt/followers","following_url":"https://api.github.com/users/dolfelt/following{/other_user}","gists_url":"https://api.github.com/users/dolfelt/gists{/gist_id}","starred_url":"https://api.github.com/users/dolfelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolfelt/subscriptions","organizations_url":"https://api.github.com/users/dolfelt/orgs","repos_url":"https://api.github.com/users/dolfelt/repos","events_url":"https://api.github.com/users/dolfelt/events{/privacy}","received_events_url":"https://api.github.com/users/dolfelt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-06-03T03:01:11Z","updated_at":"2015-06-04T13:07:16Z","closed_at":null,"body":"We need to have some sort of middleware. @shadowhand @ameech "},"comment":{"url":"https://api.github.com/repos/sparkphp/Spark/issues/comments/108892518","html_url":"https://github.com/sparkphp/Spark/issues/10#issuecomment-108892518","issue_url":"https://api.github.com/repos/sparkphp/Spark/issues/10","id":108892518,"user":{"login":"elazar","id":15487,"avatar_url":"https://avatars.githubusercontent.com/u/15487?v=3","gravatar_id":"","url":"https://api.github.com/users/elazar","html_url":"https://github.com/elazar","followers_url":"https://api.github.com/users/elazar/followers","following_url":"https://api.github.com/users/elazar/following{/other_user}","gists_url":"https://api.github.com/users/elazar/gists{/gist_id}","starred_url":"https://api.github.com/users/elazar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elazar/subscriptions","organizations_url":"https://api.github.com/users/elazar/orgs","repos_url":"https://api.github.com/users/elazar/repos","events_url":"https://api.github.com/users/elazar/events{/privacy}","received_events_url":"https://api.github.com/users/elazar/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T13:07:16Z","updated_at":"2015-06-04T13:07:16Z","body":"I can see the argument being made for authentication being handled in the domain. That said, I think I'd prefer to favor composition over traits in this instance. That is, have a class for handling authentication and have an instance of that class be injected into any action class instance that requires authentication."}}