summaryrefslogtreecommitdiff
path: root/eaaf_core/src/main/java
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2020-07-30 11:02:10 +0200
committerThomas Lenz <thomas.lenz@egiz.gv.at>2020-07-30 11:02:10 +0200
commita722ad1f7e8506c58f594ac84dfdedac88a556d4 (patch)
treec4ba585dc8b02046b452c543bff6b15dc208d481 /eaaf_core/src/main/java
parente5aa912f1d824ba4d3f9d0091a356a0da183dd4d (diff)
downloadEAAF-Components-a722ad1f7e8506c58f594ac84dfdedac88a556d4.tar.gz
EAAF-Components-a722ad1f7e8506c58f594ac84dfdedac88a556d4.tar.bz2
EAAF-Components-a722ad1f7e8506c58f594ac84dfdedac88a556d4.zip
update MOA-Sig verification API to set signature-verification timestamp
Diffstat (limited to 'eaaf_core/src/main/java')
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/IdentityLink.java29
1 files changed, 27 insertions, 2 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/IdentityLink.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/IdentityLink.java
index ee1037a1..8327b544 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/IdentityLink.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/IdentityLink.java
@@ -23,15 +23,20 @@ import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.Serializable;
import java.security.PublicKey;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
import javax.xml.transform.TransformerException;
-import org.w3c.dom.Element;
-
import at.gv.egiz.eaaf.core.api.idp.auth.data.IIdentityLink;
import at.gv.egiz.eaaf.core.impl.utils.DomUtils;
import at.gv.egiz.eaaf.core.impl.utils.XPathUtils;
+import org.w3c.dom.Element;
+
+import lombok.extern.slf4j.Slf4j;
+
/**
* Data contained in an identity link issued by BMI, relevant to the MOA ID
* component. <br>
@@ -41,10 +46,13 @@ import at.gv.egiz.eaaf.core.impl.utils.XPathUtils;
* @author Paul Ivancsics
* @version $Id$
*/
+@Slf4j
public class IdentityLink implements Serializable, IIdentityLink {
private static final long serialVersionUID = 1L;
+ public static final String PATTERN_ISSUE_INSTANT = "yyyy-MM-dd'T'HH:mm:ssXXX";
+
/**
* <code>"identificationValue"</code> is the translation of
* <code>"Stammzahl"</code>.
@@ -372,6 +380,23 @@ public class IdentityLink implements Serializable, IIdentityLink {
return issueInstant;
}
+ @Override
+ public Date getIssueInstantDate() {
+ final SimpleDateFormat f = new SimpleDateFormat(PATTERN_ISSUE_INSTANT);
+ try {
+ if (issueInstant != null) {
+ return f.parse(issueInstant);
+
+ }
+
+ } catch (final ParseException e) {
+ log.error("Can NOT parse Date from String: {}", issueInstant, null, e);
+
+ }
+
+ return null;
+ }
+
/*
* (non-Javadoc)
*