summaryrefslogtreecommitdiff
path: root/server/lib
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/auth/index.js9
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,