File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -444,6 +444,7 @@ LDAP_USER_SEARCH_BASE=
444
444
LDAP_SEARCH_FILTER = mail={{username}}
445
445
LDAP_CA_CERT_PATH =
446
446
# LDAP_TLS_REJECT_UNAUTHORIZED=
447
+ # LDAP_STARTTLS=
447
448
# LDAP_LOGIN_USES_USERNAME=true
448
449
# LDAP_ID=
449
450
# LDAP_USERNAME=
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ const {
18
18
LDAP_USERNAME ,
19
19
LDAP_EMAIL ,
20
20
LDAP_TLS_REJECT_UNAUTHORIZED ,
21
+ LDAP_STARTTLS ,
21
22
} = process . env ;
22
23
23
24
// Check required environment variables
@@ -50,6 +51,7 @@ if (LDAP_EMAIL) {
50
51
searchAttributes . push ( LDAP_EMAIL ) ;
51
52
}
52
53
const rejectUnauthorized = isEnabled ( LDAP_TLS_REJECT_UNAUTHORIZED ) ;
54
+ const startTLS = isEnabled ( LDAP_STARTTLS ) ;
53
55
54
56
const ldapOptions = {
55
57
server : {
@@ -72,6 +74,7 @@ const ldapOptions = {
72
74
} ) ( ) ,
73
75
} ,
74
76
} ) ,
77
+ ...( startTLS && { starttls : true } ) ,
75
78
} ,
76
79
usernameField : 'email' ,
77
80
passwordField : 'password' ,
You can’t perform that action at this time.
0 commit comments