相关疑难解决方法(0)

http动词的Mongoose/Express授权

我有一个在mongoose和express上运行的node.js REST服务.我也使用merse来设置我的路由.

我现在想要实现的是以下类型的sceanrios:

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
Run Code Online (Sandbox Code Playgroud)

我已经看过everyauth和mongoose-auth了,但找不到能给我这种控制的东西.

node.js express

4
推荐指数
1
解决办法
2475
查看次数

标签 统计

express ×1

node.js ×1