Skip to content

Commit 20eafbc

Browse files
committed
Allow for minor clock skew when comparing OIDC cookie and token lifetimes
1 parent d903356 commit 20eafbc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

integration-tests/oidc-wiremock/src/test/java/io/quarkus/it/keycloak/CodeFlowAuthorizationTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,8 @@ private void doTestCodeFlowUserInfo(String tenantId, long internalIdTokenLifetim
292292

293293
Cookie sessionCookie = getSessionCookie(webClient, tenantId);
294294
Date date = sessionCookie.getExpires();
295-
assertEquals(internalIdTokenLifetime, date.toInstant().getEpochSecond() - issuedAt);
295+
assertTrue(date.toInstant().getEpochSecond() - issuedAt >= internalIdTokenLifetime);
296+
assertTrue(date.toInstant().getEpochSecond() - issuedAt <= internalIdTokenLifetime + 3);
296297

297298
webClient.getCookieManager().clearCookies();
298299
}

0 commit comments

Comments
 (0)