MCPcopy
hub / github.com/openstf/stf / tryBind

Function tryBind

lib/util/ldaputil.js:99–110  ·  view source on GitHub ↗
(client, entry)

Source from the content-addressed store, hash-verified

97 }
98
99 function tryBind(client, entry) {
100 return new Promise(function(resolve, reject) {
101 client.bind(entry.object.dn, password, function(err) {
102 if (err) {
103 reject(new InvalidCredentialsError(username))
104 }
105 else {
106 resolve(entry.object)
107 }
108 })
109 })
110 }
111
112 return tryConnect().then(function(client) {
113 return tryFind(client)

Callers 1

ldaputil.jsFile · 0.85

Calls 2

rejectFunction · 0.85
resolveFunction · 0.85

Tested by

no test coverage detected