Return null instead of throwing when no matches.

This commit is contained in:
Julien Fontanet 2015-12-28 10:18:47 +01:00
parent a6e18819d4
commit 641e13496e

View File

@ -146,7 +146,7 @@ class AuthLdap {
async _authenticate ({ username, password }) {
if (username === undefined || password === undefined) {
throw null
return null
}
const client = createClient(this._clientOpts)
@ -192,7 +192,7 @@ class AuthLdap {
} catch (_) {}
}
throw null
return null
} finally {
client.unbind()
}