aboutsummaryrefslogtreecommitdiff
path: root/id/server
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-10-31 10:23:40 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-10-31 10:23:40 +0100
commit1d17cc2cb30c5ad9f419b7d619805e3823283acc (patch)
tree6911c2f099aa1e28a5300106fc238d1f1366a5bb /id/server
parenta3f530aa7637f3be6c67653f63fbedb4d6bd16d3 (diff)
downloadmoa-id-spss-1d17cc2cb30c5ad9f419b7d619805e3823283acc.tar.gz
moa-id-spss-1d17cc2cb30c5ad9f419b7d619805e3823283acc.tar.bz2
moa-id-spss-1d17cc2cb30c5ad9f419b7d619805e3823283acc.zip
fix STORK DateFormat
Diffstat (limited to 'id/server')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java
index 021eaee37..88c0e3245 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOAAttributeProvider.java
@@ -36,12 +36,17 @@ import eu.stork.peps.auth.commons.STORKStatusCode;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.joda.time.format.DateTimeFormat;
+import org.joda.time.format.DateTimeFormatter;
+
import javassist.expr.Instanceof;
/**
@@ -132,9 +137,11 @@ public class MOAAttributeProvider {
}
private String getFormatedDateOfBirth() {
- if (authData.getDateOfBirth() != null)
- return authData.getFormatedDateOfBirth();
+ if (authData.getDateOfBirth() != null) {
+ DateFormat fmt = new SimpleDateFormat("yyyyMMdd");
+ return fmt.format(authData.getDateOfBirth());
+ }
else
return null;