I am creating an API with NodeJS, Express and PassportJS but I think this is a JavaScript question.

```
app.get('/test', function (req, res, next) {
    passport.authenticate('bearer', { session: false },

    function (err, user, info) {
        if (user === false) {
            res.send('ko');
        } else {
            res.send('ok');
        }
    })(req, res, next);
});

```

My question is:

Why is `(req, res, next)` after the authenticate function? Is it related with the scope?