aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/config/middlewares/authorization.js
blob: 440f08526c35383c3e873aa4ff41aacee589a017 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13


/*
 * Generic require login routing
 */

exports.requiresLogin = function(req, res, next) {
    if (!req.isAuthenticated()) return res.redirect('/login');
    next();
}