diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-02-03 13:16:00 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-02-03 13:16:00 -0500 |
| commit | 0a5ab97ceb3a9f77666f0595eeddb74d0624000e (patch) | |
| tree | 4324fedee1d4120006858ae71fd003e24ac7ef20 /server/lib/auth/index.js | |
| parent | f51b018fd760d8550a06cb900a1311164ea881ad (diff) | |
| parent | 78620c1451f78bdb470ed89c8a1e5c7a6bb10990 (diff) | |
Merge branch 'subscriptions' of github.com:okfocus/vvalls into subscriptions
Diffstat (limited to 'server/lib/auth/index.js')
| -rw-r--r-- | server/lib/auth/index.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/server/lib/auth/index.js b/server/lib/auth/index.js index 199377d..8e20bcc 100644 --- a/server/lib/auth/index.js +++ b/server/lib/auth/index.js @@ -39,7 +39,14 @@ var auth = { auth.mail.init() }, - + initBasicAuth: function(app){ + if (config.basicAuth) { + app.use(express.basicAuth(function(user, pass) { + return user === config.basicAuth.user && + pass === config.basicAuth.pass + })) + } + }, initSockets: function (io, SessionStore) { io.set('authorization', passportSocketIo.authorize({ cookieParser: express.cookieParser, |
