PR #458 - fix and improvement required by @mp1509

This commit is contained in:
Antonio Cordeddu
2022-08-09 12:21:34 +02:00
parent 1ea46e9952
commit 97a2de2f48
35 changed files with 287 additions and 62 deletions

View File

@ -120,7 +120,7 @@ class LoginForm extends Model
$validators = $module->twoFactorAuthenticationValidators;
$type = $this->user->auth_tf_type;
$class = ArrayHelper::getValue($validators,$type.'.class');
$codeDurationTime = ArrayHelper::getValue($validators,$type.'.codeDurationTime', 0);
$codeDurationTime = ArrayHelper::getValue($validators,$type.'.codeDurationTime', 300);
$validator = $this
->make($class, [$this->user, $this->twoFactorAuthenticationCode, $this->module->twoFactorAuthenticationCycles]);
$success = $validator->validate();