【发布时间】:2012-06-26 14:10:52
【问题描述】:
我有一个在 mongoose 和 express 上运行的 node.js REST 服务。我也在使用 merse 来设置我的路由。
我现在想要实现的是以下类型的场景:
Scenario I: e.g. blogpost
- GET -> no authentication required
- POST/PUT/DELETE -> authentication required
Scenario II: e.g. user
- GET -> authentication required
- POST/PUT/DELETE -> authentication required plus username of logged in user has to match
我已经看过everyauth 和mongoose-auth,但找不到任何可以让我进行这种控制的东西。
【问题讨论】: