UNPKG

sqlpad

Version:

Web app for writing and running SQL queries and visualizing the results. Supports Postgres, MySQL, SQL Server, Crate and Vertica.

10 lines (8 loc) 281 B
var passport = require('passport') module.exports = function mustBeAuthenticated(req, res, next) { if (req.isAuthenticated()) { return next() } passport.authenticate('basic', { session: false })(req, res, next) // next(new Error('You must be logged in to do that')) }