Add support for LDAP cn=...+totptoken=.. support
This commit is contained in:
@@ -356,7 +356,9 @@ async function verify(userId, password, identifier) {
|
||||
}
|
||||
|
||||
if (user.source === 'ldap') {
|
||||
await externalLdap.verifyPassword(user, password);
|
||||
const ldapUser = await externalLdap.verifyPassword(user, password);
|
||||
// currently we store twoFactorAuthenticationEnabled in the db as local so amend it to user object
|
||||
user.twoFactorAuthenticationEnabled = !!ldapUser.twoFactorAuthenticationEnabled;
|
||||
} else {
|
||||
const saltBinary = Buffer.from(user.salt, 'hex');
|
||||
const [error, derivedKey] = await safe(pbkdf2Async(password, saltBinary, CRYPTO_ITERATIONS, CRYPTO_KEY_LENGTH, CRYPTO_DIGEST));
|
||||
|
||||
Reference in New Issue
Block a user