ldap authentication works
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
module.exports = function(io) {
|
||||
module.exports = function(io, authentication) {
|
||||
|
||||
var pty = require('pty.js');
|
||||
var proc = require('child_process');
|
||||
@@ -287,10 +287,9 @@ module.exports = function(io) {
|
||||
//get credentials sent by the client
|
||||
var username = data.username;
|
||||
var password = data.password;
|
||||
if (username=="hello")
|
||||
return callback(null, "world" == password);
|
||||
else
|
||||
return callback(new Error("wrong credentials"));
|
||||
authentication(data.username, data.password,
|
||||
function() {console.log("####LOGIN-SUCESS####");callback(null, true)},
|
||||
function() {console.log("####LOGIN-FAIL####");callback(new Error("wrong credentials"))});
|
||||
},
|
||||
postAuthenticate: connection,
|
||||
timeout: "none"
|
||||
|
Reference in New Issue
Block a user