ldapts
Advanced tools
Comparing version 2.0.3 to 2.1.0
@@ -0,1 +1,4 @@ | ||
### 2.1.0 | ||
* Use secure connection if `tlsOptions` is specified or if url starts with `ldaps:` when constructing a client. Fix #71 | ||
### 2.0.3 | ||
@@ -2,0 +5,0 @@ * Update npms |
@@ -45,3 +45,4 @@ "use strict"; | ||
} | ||
this.secure = parsedUrl.protocol === 'ldaps:'; | ||
const isSecureProtocol = parsedUrl.protocol === 'ldaps:'; | ||
this.secure = isSecureProtocol || !!this.clientOptions.tlsOptions; | ||
this.host = parsedUrl.hostname || 'localhost'; | ||
@@ -51,3 +52,3 @@ if (parsedUrl.port) { | ||
} | ||
else if (this.secure) { | ||
else if (isSecureProtocol) { | ||
this.port = 636; | ||
@@ -54,0 +55,0 @@ } |
{ | ||
"name": "ldapts", | ||
"version": "2.0.3", | ||
"version": "2.1.0", | ||
"description": "LDAP client", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
315714
4807