ldap change to url for making it possible to use ldaps:// too
This commit is contained in:
parent
206e7a5b52
commit
5325f2ea78
2 changed files with 4 additions and 6 deletions
|
@ -114,8 +114,7 @@ host="0.0.0.0"
|
||||||
[ldap]
|
[ldap]
|
||||||
# enable to use ldap user backend
|
# enable to use ldap user backend
|
||||||
enabled=false
|
enabled=false
|
||||||
host="localhost"
|
url="ldap://localhost:3002"
|
||||||
port=3002
|
|
||||||
baseDN="ou=users,dc=company"
|
baseDN="ou=users,dc=company"
|
||||||
filter="(|(username={{username}})(mail={{username}}))"
|
filter="(|(username={{username}})(mail={{username}}))"
|
||||||
#Username field in LDAP (uid/cn/username)
|
#Username field in LDAP (uid/cn/username)
|
||||||
|
@ -128,8 +127,7 @@ bindPassword=""
|
||||||
[ldapauth]
|
[ldapauth]
|
||||||
# Alternative LDAP implementation using the more popular passport-ldapauth library.
|
# Alternative LDAP implementation using the more popular passport-ldapauth library.
|
||||||
enabled=false
|
enabled=false
|
||||||
host="localhost"
|
url="ldap://localhost:389"
|
||||||
port=389
|
|
||||||
# Subtree in which the searchrequest for the user is done
|
# Subtree in which the searchrequest for the user is done
|
||||||
baseDN="ou=users,dc=company"
|
baseDN="ou=users,dc=company"
|
||||||
# What whe are searching for. This should return a single user.
|
# What whe are searching for. This should return a single user.
|
||||||
|
|
|
@ -87,7 +87,7 @@ if (config.ldap.enabled && LdapStrategy) {
|
||||||
|
|
||||||
let opts = {
|
let opts = {
|
||||||
server: {
|
server: {
|
||||||
url: 'ldap://' + config.ldap.host + ':' + config.ldap.port
|
url: config.ldap.url
|
||||||
},
|
},
|
||||||
base: config.ldap.baseDN,
|
base: config.ldap.baseDN,
|
||||||
search: {
|
search: {
|
||||||
|
@ -130,7 +130,7 @@ if (config.ldap.enabled && LdapStrategy) {
|
||||||
log.info('Using LDAP auth (passport-ldapauth)');
|
log.info('Using LDAP auth (passport-ldapauth)');
|
||||||
let opts = {
|
let opts = {
|
||||||
server: {
|
server: {
|
||||||
url: 'ldap://' + config.ldap.host + ':' + config.ldap.port,
|
url: config.ldapauth.url,
|
||||||
searchBase: config.ldapauth.baseDN,
|
searchBase: config.ldapauth.baseDN,
|
||||||
searchFilter: config.ldapauth.filter,
|
searchFilter: config.ldapauth.filter,
|
||||||
searchAttributes: [config.ldapauth.uidTag, 'mail'],
|
searchAttributes: [config.ldapauth.uidTag, 'mail'],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue