From ce7e30f92356f602b65a0608b8224dd93b271f5e Mon Sep 17 00:00:00 2001
From: Thomas <>
Date: Fri, 13 May 2022 09:00:52 +0200
Subject: refact(core): switch to eaaf-components 1.3.x and replace
'java.util.Date' by 'java.time.Instant'
---
.../eidas/specific/core/builder/AuthenticationDataBuilder.java | 7 +++----
.../test/protocol/ProxyServiceAuthenticationActionTest.java | 6 +++---
pom.xml | 2 +-
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/builder/AuthenticationDataBuilder.java b/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/builder/AuthenticationDataBuilder.java
index 9580a62f..e719735c 100644
--- a/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/builder/AuthenticationDataBuilder.java
+++ b/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/builder/AuthenticationDataBuilder.java
@@ -23,7 +23,7 @@
package at.asitplus.eidas.specific.core.builder;
-import java.util.Date;
+import java.time.Instant;
import org.springframework.stereotype.Service;
@@ -58,8 +58,7 @@ public class AuthenticationDataBuilder extends AbstractAuthenticationDataBuilder
// set specific informations
authData.setSsoSessionValidTo(
- new Date(new Date().getTime() + MsEidasNodeConstants.DEFAULT_PVP_ASSERTION_VALIDITY * 60 * 1000));
-
+ Instant.now().plusSeconds(MsEidasNodeConstants.DEFAULT_PVP_ASSERTION_VALIDITY * 60));
authData.setEidStatus(authProcessData.isTestIdentity()
? EidIdentityStatusLevelValues.TESTIDENTITY : EidIdentityStatusLevelValues.IDENTITY);
@@ -78,7 +77,7 @@ public class AuthenticationDataBuilder extends AbstractAuthenticationDataBuilder
// set specific informations
((EidAuthenticationData)authData).setSsoSessionValidTo(
- new Date(new Date().getTime() + MsEidasNodeConstants.DEFAULT_PVP_ASSERTION_VALIDITY * 60 * 1000));
+ Instant.now().plusSeconds(MsEidasNodeConstants.DEFAULT_PVP_ASSERTION_VALIDITY * 60));
//set E-ID status-level
final EidAuthProcessDataWrapper authProcessData =
diff --git a/modules/eidas_proxy-sevice/src/test/java/at/asitplus/eidas/specific/modules/auth/idaustria/test/protocol/ProxyServiceAuthenticationActionTest.java b/modules/eidas_proxy-sevice/src/test/java/at/asitplus/eidas/specific/modules/auth/idaustria/test/protocol/ProxyServiceAuthenticationActionTest.java
index 52cc01d4..21d2f3b7 100644
--- a/modules/eidas_proxy-sevice/src/test/java/at/asitplus/eidas/specific/modules/auth/idaustria/test/protocol/ProxyServiceAuthenticationActionTest.java
+++ b/modules/eidas_proxy-sevice/src/test/java/at/asitplus/eidas/specific/modules/auth/idaustria/test/protocol/ProxyServiceAuthenticationActionTest.java
@@ -10,9 +10,9 @@ import static org.junit.Assert.assertTrue;
import java.net.URISyntaxException;
import java.net.URLDecoder;
+import java.time.Instant;
import java.util.Arrays;
import java.util.Collections;
-import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
@@ -474,7 +474,7 @@ public class ProxyServiceAuthenticationActionTest {
}
@Override
- public Date getSsoSessionValidTo() {
+ public Instant getSsoSessionValidTo() {
// TODO Auto-generated method stub
return null;
}
@@ -591,7 +591,7 @@ public class ProxyServiceAuthenticationActionTest {
}
@Override
- public Date getAuthenticationIssueInstant() {
+ public Instant getAuthenticationIssueInstant() {
// TODO Auto-generated method stub
return null;
}
diff --git a/pom.xml b/pom.xml
index 0f04a7d7..628e8a1f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
0.3
0.4
- 1.2.1-SNAPSHOT
+ 1.3.2
2.5.13
2.5.6
--
cgit v1.2.3