Fixed testі
This commit is contained in:
parent
fd6ead6c48
commit
9fd78e595c
@ -156,14 +156,14 @@ public abstract class TwoFactorAuthTest extends AbstractControllerTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testTwoFaPreVerificationTokenLifetime() throws Exception {
|
public void testTwoFaPreVerificationTokenLifetime() throws Exception {
|
||||||
configureTotpTwoFa(twoFaSettings -> {
|
configureTotpTwoFa(twoFaSettings -> {
|
||||||
twoFaSettings.setTotalAllowedTimeForVerification(5);
|
twoFaSettings.setTotalAllowedTimeForVerification(65);
|
||||||
});
|
});
|
||||||
|
|
||||||
logInWithPreVerificationToken(username, password);
|
logInWithPreVerificationToken(username, password);
|
||||||
|
|
||||||
await("expiration of the pre-verification token")
|
await("expiration of the pre-verification token")
|
||||||
.atLeast(Duration.ofSeconds(3).plusMillis(500))
|
.atLeast(Duration.ofSeconds(30).plusMillis(500))
|
||||||
.atMost(Duration.ofSeconds(6))
|
.atMost(Duration.ofSeconds(70))
|
||||||
.untilAsserted(() -> {
|
.untilAsserted(() -> {
|
||||||
doPost("/api/auth/2fa/verification/send?providerType=TOTP")
|
doPost("/api/auth/2fa/verification/send?providerType=TOTP")
|
||||||
.andExpect(status().isUnauthorized());
|
.andExpect(status().isUnauthorized());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user