Skip to content
Snippets Groups Projects
Unverified Commit 9de50e26 authored by Cracker's avatar Cracker Committed by GitHub
Browse files

Update README.md

parent c2cd7d48
No related branches found
No related tags found
No related merge requests found
# ldapAuth # ldapAuth
LDAP Authentication bridge 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...)
# HowTo Server
Starting the Server is simple:
```
var 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);
}
}
});
```
# HowTo Client
Change to this settings at your LDAP Client
* HOST: IP of the Server you set this up
* PORT: Change to the port you defined (389 default)
* DN Bind: `cn=auth`
* DN Password: Change to your ldapServerPassword
* Base for user filter: `ou=Users`
* User filter: `(&(uid=%s))`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment