method creates a new extractor that looks for the JWT in the authorization header with the scheme 'bearer'. You can go through this link to explore more about different methods available in passport-jwt. code example
Example: jwt strategy
app.post('/profile', passport.authenticate('jwt', { session: false }),
function(req, res) {
res.send(req.user.profile);
}
);