aboutsummaryrefslogtreecommitdiff
path: root/modules/core_common_webapp
diff options
context:
space:
mode:
authorThomas <>2022-05-13 09:00:52 +0200
committerThomas <>2022-05-13 09:00:52 +0200
commitce7e30f92356f602b65a0608b8224dd93b271f5e (patch)
treee7f49e31810d45ee8bcaf7bca329928729dd0f63 /modules/core_common_webapp
parenta11517f4d25f31e352a9665392ad000dff4a44c5 (diff)
downloadNational_eIDAS_Gateway-ce7e30f92356f602b65a0608b8224dd93b271f5e.tar.gz
National_eIDAS_Gateway-ce7e30f92356f602b65a0608b8224dd93b271f5e.tar.bz2
National_eIDAS_Gateway-ce7e30f92356f602b65a0608b8224dd93b271f5e.zip
refact(core): switch to eaaf-components 1.3.x and replace 'java.util.Date' by 'java.time.Instant'
Diffstat (limited to 'modules/core_common_webapp')
-rw-r--r--modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/builder/AuthenticationDataBuilder.java7
1 files changed, 3 insertions, 4 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 =