LDAP Authentication bridge
This will start a LDAP Server witch can be used to auth against and bridge the auth to where ever you want (TextFile, Database, SMTP Auth...)
Starting the Server is simple:
npm ivar ldapAuth = require('./ldapAuth');
ldapAuth.init({
serverPort : 389, //Default 389
ldapServerPassword : "asdg", //Change password here
warningCallback : function(warning) {
console.log("warning",warning);
},
errorCallback : function(error) {
console.log("error",error);
},
checkPassword : function(auth, isPasswordCorrectCallback) {
var userName = auth["userName"];
var userPassword = auth["userPassword"];
if(userName=="test" && userPassword=="test") { //Test user+pw combination here
isPasswordCorrectCallback(true);
} else {
isPasswordCorrectCallback(false);
}
}
});
Change to this settings at your LDAP Client
cn=authou=user(&(uid=%s))usernamemailContent type
Image
Digest
Size
256.4 MB
Last updated
over 8 years ago
docker pull rofl256/ldapauth