Return null instead of throwing when no matches.
This commit is contained in:
parent
a6e18819d4
commit
641e13496e
@ -146,7 +146,7 @@ class AuthLdap {
|
|||||||
|
|
||||||
async _authenticate ({ username, password }) {
|
async _authenticate ({ username, password }) {
|
||||||
if (username === undefined || password === undefined) {
|
if (username === undefined || password === undefined) {
|
||||||
throw null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
const client = createClient(this._clientOpts)
|
const client = createClient(this._clientOpts)
|
||||||
@ -192,7 +192,7 @@ class AuthLdap {
|
|||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw null
|
return null
|
||||||
} finally {
|
} finally {
|
||||||
client.unbind()
|
client.unbind()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user