diff options
Diffstat (limited to 'id/server/modules/module-stork/src/main/java')
-rw-r--r-- | id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorTask.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorTask.java b/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorTask.java index 1a18f8198..59f54f957 100644 --- a/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorTask.java +++ b/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorTask.java @@ -319,8 +319,18 @@ public class PepsConnectorTask extends AbstractAuthServletTask { // extract signed doc element and citizen signature
String citizenSignature = null;
try {
- String signatureInfo = authnResponse.getPersonalAttributeList().get("signedDoc").getValue().get(0); // TODO ERROR HANDLING
+ if (authnResponse.getPersonalAttributeList().get("signedDoc") == null
+ || authnResponse.getPersonalAttributeList().get("signedDoc").getValue() == null
+ || authnResponse.getPersonalAttributeList().get("signedDoc").getValue().get(0) == null) {
+ Logger.info("STORK Response include NO signedDoc attribute!");
+ throw new STORKException("STORK Response include NO signedDoc attribute.");
+
+ }
+
+ String signatureInfo = authnResponse.getPersonalAttributeList().get("signedDoc").getValue().get(0);
+
+
Logger.debug("signatureInfo:" + signatureInfo);
SignResponse dssSignResponse = (SignResponse) ApiUtils.unmarshal(new StreamSource(
|