summaryrefslogtreecommitdiff
path: root/eaaf_modules/eaaf_module_auth_sl20/src/main/java
diff options
context:
space:
mode:
authorThomas <>2021-02-18 14:24:32 +0100
committerThomas <>2021-02-18 14:24:32 +0100
commit4d7e36eb85608386fde5831847b5a962a64fe95e (patch)
treec251eda359e861f144ae276fb14c61cf1c12a96c /eaaf_modules/eaaf_module_auth_sl20/src/main/java
parent0fa886c395f8817847911ae3e9f9486b1283028f (diff)
downloadEAAF-Components-4d7e36eb85608386fde5831847b5a962a64fe95e.tar.gz
EAAF-Components-4d7e36eb85608386fde5831847b5a962a64fe95e.tar.bz2
EAAF-Components-4d7e36eb85608386fde5831847b5a962a64fe95e.zip
update error-handling in case of a VDA communication failed
Diffstat (limited to 'eaaf_modules/eaaf_module_auth_sl20/src/main/java')
-rw-r--r--eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractCreateQualEidRequestTask.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractCreateQualEidRequestTask.java b/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractCreateQualEidRequestTask.java
index 63bf7897..a1d5591a 100644
--- a/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractCreateQualEidRequestTask.java
+++ b/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractCreateQualEidRequestTask.java
@@ -1,7 +1,8 @@
package at.gv.egiz.eaaf.modules.auth.sl20.tasks;
import java.io.Serializable;
-import java.net.ConnectException;
+import java.net.SocketException;
+import java.net.SocketTimeoutException;
import java.nio.charset.StandardCharsets;
import java.security.cert.CertificateEncodingException;
import java.util.ArrayList;
@@ -63,7 +64,8 @@ public abstract class AbstractCreateQualEidRequestTask extends AbstractAuthServl
log.debug("Starting SL2.0 authentication process .... ");
revisionsLogger.logEvent(pendingReq, EventCodes.AUTHPROCESS_SL20_SELECTED, "sl20auth");
-
+
+ String vdaQualEidDUrl = null;
try {
// get service-provider configuration
final ISpConfiguration oaConfig = pendingReq.getServiceProviderConfiguration();
@@ -75,7 +77,7 @@ public abstract class AbstractCreateQualEidRequestTask extends AbstractAuthServl
}
// get basic configuration parameters
- final String vdaQualEidDUrl = extractVdaUrlForSpecificOa(oaConfig, executionContext);
+ vdaQualEidDUrl = extractVdaUrlForSpecificOa(oaConfig, executionContext);
if (StringUtils.isEmpty(vdaQualEidDUrl)) {
log.error("NO VDA URL for qualified eID (" + Constants.CONFIG_PROP_VDA_ENDPOINT_QUALeID_DEFAULT + ")");
throw new SL20Exception("sl20.03", new Object[] { "NO VDA URL for qualified eID" });
@@ -191,8 +193,9 @@ public abstract class AbstractCreateQualEidRequestTask extends AbstractAuthServl
} catch (final EaafAuthenticationException e) {
throw new TaskExecutionException(pendingReq, "SL2.0 Authentication FAILED. Msg: " + e.getMessage(), e);
- } catch (final ConnectException e) {
- log.error("SL2.0 Authentication has a VDA connector error.", e);
+ } catch (final SocketException | SocketTimeoutException e) {
+ log.error("SL2.0 Authentication has a VDA connector error. Endpoint: {}",
+ vdaQualEidDUrl, e);
throw new TaskExecutionException(pendingReq, e.getMessage(),
new SL20Exception("sl20.02", new Object[] { e.getMessage()}, e));