|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
- * Copyright 2002-2018 the original author or authors.
|
|
|
+ * Copyright 2002-2021 the original author or authors.
|
|
|
*
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
* you may not use this file except in compliance with the License.
|
|
@@ -23,6 +23,7 @@ import java.time.ZoneId;
|
|
|
import java.util.Collection;
|
|
|
import java.util.Collections;
|
|
|
import java.util.Map;
|
|
|
+import java.util.Objects;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import org.junit.Test;
|
|
@@ -64,6 +65,7 @@ public class JwtTimestampValidatorTests {
|
|
|
.collect(Collectors.toList());
|
|
|
// @formatter:on
|
|
|
assertThat(messages).contains("Jwt expired at " + oneHourAgo);
|
|
|
+ assertThat(details).allMatch((error) -> Objects.equals(error.getErrorCode(), OAuth2ErrorCodes.INVALID_TOKEN));
|
|
|
}
|
|
|
|
|
|
@Test
|
|
@@ -78,6 +80,7 @@ public class JwtTimestampValidatorTests {
|
|
|
.collect(Collectors.toList());
|
|
|
// @formatter:on
|
|
|
assertThat(messages).contains("Jwt used before " + oneHourFromNow);
|
|
|
+ assertThat(details).allMatch((error) -> Objects.equals(error.getErrorCode(), OAuth2ErrorCodes.INVALID_TOKEN));
|
|
|
}
|
|
|
|
|
|
@Test
|