我想找出用户是否在中间件中通过了“jwt”的身份验证。有没有类似于passportjs的req.isAuthenticated()方法?
module.exports = function(app){
return function(req, res, next){
// How to implement the below step?
var isAuthenticated = app.use(jwt({secret: app.get('jwtTokenSecret')}))
if(isAuthenticated){
// do some logic
}
}
}