jwt strategy

JavaScript
app.post('/profile', passport.authenticate('jwt', { session: false }),
    function(req, res) {
        res.send(req.user.profile);
    }
);

Source

Also in JavaScript: