{"action":"created","issue":{"url":"https://api.github.com/repos/feathersjs/feathers-hooks/issues/39","repository_url":"https://api.github.com/repos/feathersjs/feathers-hooks","labels_url":"https://api.github.com/repos/feathersjs/feathers-hooks/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/feathersjs/feathers-hooks/issues/39/comments","events_url":"https://api.github.com/repos/feathersjs/feathers-hooks/issues/39/events","html_url":"https://github.com/feathersjs/feathers-hooks/issues/39","id":133699557,"number":39,"title":"hook on non-service apps?","user":{"login":"wuyuanyi135","id":11760870,"avatar_url":"https://avatars.githubusercontent.com/u/11760870?v=3","gravatar_id":"","url":"https://api.github.com/users/wuyuanyi135","html_url":"https://github.com/wuyuanyi135","followers_url":"https://api.github.com/users/wuyuanyi135/followers","following_url":"https://api.github.com/users/wuyuanyi135/following{/other_user}","gists_url":"https://api.github.com/users/wuyuanyi135/gists{/gist_id}","starred_url":"https://api.github.com/users/wuyuanyi135/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wuyuanyi135/subscriptions","organizations_url":"https://api.github.com/users/wuyuanyi135/orgs","repos_url":"https://api.github.com/users/wuyuanyi135/repos","events_url":"https://api.github.com/users/wuyuanyi135/events{/privacy}","received_events_url":"https://api.github.com/users/wuyuanyi135/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-02-15T12:22:58Z","updated_at":"2016-09-05T15:01:52Z","closed_at":"2016-02-15T15:39:57Z","body":"I want to authenticate the user before the request\r\n```app.post('/import', import)```\r\nwhich is not a feather service.\r\n\r\nIs it possible to use the hook\r\n```js\r\nimport.before({\r\n  [\r\n    authHooks.verifyToken({secret: 'feathers-rocks'}),\r\n    authHooks.populateUser(),\r\n    authHooks.requireAuth()\r\n  ]\r\n})\r\n```\r\ninstead of writing the middle-ware by myself?"},"comment":{"url":"https://api.github.com/repos/feathersjs/feathers-hooks/issues/comments/244766659","html_url":"https://github.com/feathersjs/feathers-hooks/issues/39#issuecomment-244766659","issue_url":"https://api.github.com/repos/feathersjs/feathers-hooks/issues/39","id":244766659,"user":{"login":"marshallswain","id":128857,"avatar_url":"https://avatars.githubusercontent.com/u/128857?v=3","gravatar_id":"","url":"https://api.github.com/users/marshallswain","html_url":"https://github.com/marshallswain","followers_url":"https://api.github.com/users/marshallswain/followers","following_url":"https://api.github.com/users/marshallswain/following{/other_user}","gists_url":"https://api.github.com/users/marshallswain/gists{/gist_id}","starred_url":"https://api.github.com/users/marshallswain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marshallswain/subscriptions","organizations_url":"https://api.github.com/users/marshallswain/orgs","repos_url":"https://api.github.com/users/marshallswain/repos","events_url":"https://api.github.com/users/marshallswain/events{/privacy}","received_events_url":"https://api.github.com/users/marshallswain/received_events","type":"User","site_admin":false},"created_at":"2016-09-05T15:01:52Z","updated_at":"2016-09-05T15:01:52Z","body":"I'm not going to be much help on hooking non rest methods, but when a use joins a chat room, what in your database changes?  If you are storing the memberships directly in the chat room document then that maps to patching a chat room.  If you are using an intermediary table to track which users belong in which chat rooms, then you are dealing with memberships, and not chat rooms, at that point. So it might be cleaner to create a memberships service for those methods."}}
{"actor":{"display_login":"marshallswain"}}