且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用身份验证中间件快递资源?

更新时间:2023-12-03 10:08:10

我知道这已经太晚了,原来的帖子已经回复了,但是我正在寻找同样的答案,并找到了一个我认为别人想知道的解决方案。

I know this is a little too late, and the original post was answered, however, I was looking for the same answer and found a solution I thought others might want to know.

只需确保从护照中调用确认。

Just make sure ensureAuthenticated is called from passport.

    app.resource('users', passport.ensureAuthenticated, require('./resources/users'));

这里找到: https://gist.github.com/1941301