There already exists clockSkew validation parameter with default value
of 5 minutes.
however it was just left unwired which caused some messages to be
dropped due to NotBefore validation failures due to clock skew.
Fixing this.
This commit is contained in:
Denis Lagno 2019-09-12 14:00:55 -07:00
Родитель 5a3fcb6f19
Коммит a9890ce35c
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -93,7 +93,9 @@ public class JwtTokenExtractor {
}
return CompletableFuture.supplyAsync(() -> {
Verification verification = JWT.require(Algorithm.RSA256(key.key, null));
Verification verification = JWT
.require(Algorithm.RSA256(key.key, null))
.acceptLeeway(tokenValidationParameters.clockSkew.getSeconds());
try {
verification.build().verify(token);