Merge pull request #341 from MelwinKfr/patch-1
add: LDAP options `bindUser` and `bindPassword`
This commit is contained in:
commit
b30a9f2e41
2 changed files with 6 additions and 1 deletions
|
@ -121,6 +121,9 @@ filter="(|(username={{username}})(mail={{username}}))"
|
||||||
#Username field in LDAP (uid/cn/username)
|
#Username field in LDAP (uid/cn/username)
|
||||||
uidTag="username"
|
uidTag="username"
|
||||||
passwordresetlink=""
|
passwordresetlink=""
|
||||||
|
# Use a different user to bind LDAP (final bind DN will be: {{uidTag}}={{bindUser}},{{baseDN}})
|
||||||
|
bindUser=""
|
||||||
|
bindPassword=""
|
||||||
|
|
||||||
[postfixbounce]
|
[postfixbounce]
|
||||||
# Enable to allow writing Postfix bounce log to Mailtrain listener
|
# Enable to allow writing Postfix bounce log to Mailtrain listener
|
||||||
|
|
|
@ -85,7 +85,9 @@ if (config.ldap.enabled && LdapStrategy) {
|
||||||
attributes: [config.ldap.uidTag, 'mail'],
|
attributes: [config.ldap.uidTag, 'mail'],
|
||||||
scope: 'sub'
|
scope: 'sub'
|
||||||
},
|
},
|
||||||
uidTag: config.ldap.uidTag
|
uidTag: config.ldap.uidTag,
|
||||||
|
bindUser: config.ldap.bindUser,
|
||||||
|
bindPassword: config.ldap.bindPassword
|
||||||
};
|
};
|
||||||
|
|
||||||
passport.use(new LdapStrategy(opts, (profile, done) => {
|
passport.use(new LdapStrategy(opts, (profile, done) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue