{"action":"closed","issue":{"url":"https://api.github.com/repos/75team/thinkjs/issues/501","repository_url":"https://api.github.com/repos/75team/thinkjs","labels_url":"https://api.github.com/repos/75team/thinkjs/issues/501/labels{/name}","comments_url":"https://api.github.com/repos/75team/thinkjs/issues/501/comments","events_url":"https://api.github.com/repos/75team/thinkjs/issues/501/events","html_url":"https://github.com/75team/thinkjs/issues/501","id":186485703,"number":501,"title":"关于API Token验证，请问 是都放在每个controller 的__before中吗？","user":{"login":"dingyiming","id":12537013,"avatar_url":"https://avatars.githubusercontent.com/u/12537013?v=3","gravatar_id":"","url":"https://api.github.com/users/dingyiming","html_url":"https://github.com/dingyiming","followers_url":"https://api.github.com/users/dingyiming/followers","following_url":"https://api.github.com/users/dingyiming/following{/other_user}","gists_url":"https://api.github.com/users/dingyiming/gists{/gist_id}","starred_url":"https://api.github.com/users/dingyiming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dingyiming/subscriptions","organizations_url":"https://api.github.com/users/dingyiming/orgs","repos_url":"https://api.github.com/users/dingyiming/repos","events_url":"https://api.github.com/users/dingyiming/events{/privacy}","received_events_url":"https://api.github.com/users/dingyiming/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-01T08:52:25Z","updated_at":"2016-11-02T04:23:28Z","closed_at":"2016-11-02T04:23:28Z","body":"## DESC\r\n\r\n- 关于API Token验证，请问 是都放在每个controller 的__before中吗？放到 base controller担心，有些方法不需要登录怎么办？怎么分开？\r\n- 能否，验证同时拿到 用户 ID， 传递到后面具体方法中继续使用？\r\n- API Token 是通过 查询 redis 中是否存在 token: userId 键值对，来判断为哪个用户吗？\r\n- 然后我需要刷新 Token 时间的话，是否应该重新生成Token存储 键值对，还是说只需要改下Token时效？\r\n\r\n## ENV\r\n\r\nPlatform: windows\r\n\r\nNode.js Version: v6.9.1 \r\n\r\nThinkJS Version: 2.2.x\r\n"}}
{"actor":{"display_login":"dingyiming"}}