Поле token в контексте otp токенов переименовано в totp

This commit is contained in:
ErickSkrauch
2017-09-06 20:17:52 +03:00
parent 2bdb79b43d
commit 2c08130f4e
16 changed files with 65 additions and 63 deletions

View File

@ -52,10 +52,10 @@ class TotpValidator extends Validator {
try {
$totp = TOTP::create($this->account->otp_secret);
if (!$totp->verify((string)$value, $this->getTimestamp(), $this->window)) {
return [E::OTP_TOKEN_INCORRECT, []];
return [E::TOTP_INCORRECT, []];
}
} catch (RangeException $e) {
return [E::OTP_TOKEN_INCORRECT, []];
return [E::TOTP_INCORRECT, []];
}
return null;