Теперь на этапе включения TOTP код может истечь в течение 2 периодов

This commit is contained in:
ErickSkrauch
2017-11-20 20:48:43 +03:00
parent dab0ab4cba
commit 47b6761f78
3 changed files with 13 additions and 2 deletions

View File

@@ -58,4 +58,15 @@ class EnableTwoFactorAuthCest {
]);
}
public function testSuccessEnableWithNotSoExpiredCode(FunctionalTester $I) {
$accountId = $I->amAuthenticated('AccountWithOtpSecret');
$totp = TOTP::create('AAAA');
$this->route->enableTwoFactorAuth($accountId, $totp->at(time() - 35), 'password_0');
$I->canSeeResponseCodeIs(200);
$I->canSeeResponseIsJson();
$I->canSeeResponseContainsJson([
'success' => true,
]);
}
}