aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java30
1 files changed, 18 insertions, 12 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java
index 2c8b44404..2f1e50a05 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/stork/STORKResponseProcessor.java
@@ -136,8 +136,10 @@ public class STORKResponseProcessor {
Logger.trace("Starting call...");
// if there is no signedDoc attribute, we cannot go on
+ String fiscalNumber = null;
String citizenSignature = getAttributeValue("signedDoc", attributeList);
- String fiscalNumber = getAttributeValue("fiscalNumber", attributeList);
+ if (hasAttribute("fiscalNumber", attributeList))
+ fiscalNumber = getAttributeValue("fiscalNumber", attributeList);
// if we have a signedDoc we test for a representation case
// - according to stork samlengine and commons
@@ -156,14 +158,15 @@ public class STORKResponseProcessor {
String eIdentifier = getAttributeValue("eIdentifier", attributeList);
String givenName = getAttributeValue("givenName", attributeList);
String lastName = getAttributeValue("surname", attributeList);
- String dateOfBirth = getAttributeValue("dateOfBirth", attributeList);
+ String dateOfBirth = null;
+ if (hasAttribute("dateOfBirth", attributeList)) {
+ dateOfBirth = getAttributeValue("dateOfBirth", attributeList);
+ dateOfBirth = DateTimeUtils.formatPEPSDateToMOADate(dateOfBirth);
+ }
// gender attribute is mandatory here because of some legal stuff
String gender = getAttributeValue("gender", attributeList);
- if (!StringUtils.isEmpty(dateOfBirth))
- dateOfBirth = DateTimeUtils.formatPEPSDateToMOADate(dateOfBirth);
-
identityLinkResponse = AuthenticationServer.getInstance().getIdentityLink(eIdentifier,
givenName, lastName, dateOfBirth, gender, citizenSignature, null,
null, mandate, targetType, targetValue, oaFriendlyName, filters, fiscalNumber);
@@ -187,14 +190,15 @@ public class STORKResponseProcessor {
String eIdentifier = getAttributeValue("eIdentifier", attributeList);
String givenName = getAttributeValue("givenName", attributeList);
String lastName = getAttributeValue("surname", attributeList);
- String dateOfBirth = getAttributeValue("dateOfBirth", attributeList);
+ String dateOfBirth = null;
+ if (hasAttribute("dateOfBirth", attributeList)) {
+ dateOfBirth = getAttributeValue("dateOfBirth", attributeList);
+ dateOfBirth = DateTimeUtils.formatPEPSDateToMOADate(dateOfBirth);
+ }
// gender attribute is mandatory here because of some legal stuff
String gender = getAttributeValue("gender", attributeList);
-
- if (!StringUtils.isEmpty(dateOfBirth))
- dateOfBirth = DateTimeUtils.formatPEPSDateToMOADate(dateOfBirth);
-
+
identityLinkResponse = AuthenticationServer.getInstance().getIdentityLink(eIdentifier,
givenName, lastName, dateOfBirth, gender, citizenSignature, representative,
represented, mandate, targetType, targetValue, oaFriendlyName, filters, fiscalNumber);
@@ -204,9 +208,11 @@ public class STORKResponseProcessor {
String eIdentifier = getAttributeValue("eIdentifier", attributeList);
String givenName = getAttributeValue("givenName", attributeList);
String lastName = getAttributeValue("surname", attributeList);
- String dateOfBirth = getAttributeValue("dateOfBirth", attributeList);
- if (!StringUtils.isEmpty(dateOfBirth))
+ String dateOfBirth = null;
+ if (hasAttribute("dateOfBirth", attributeList)) {
+ dateOfBirth = getAttributeValue("dateOfBirth", attributeList);
dateOfBirth = DateTimeUtils.formatPEPSDateToMOADate(dateOfBirth);
+ }
identityLinkResponse = AuthenticationServer.getInstance().getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, citizenSignature, fiscalNumber);
}