aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/idserverlib/src/test/java')
-rw-r--r--id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/CreateSAML1AssertionTask.java7
-rw-r--r--id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/GetIdentityLinkTask.java6
-rw-r--r--id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/SignAuthBlockTask.java7
-rw-r--r--id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/ValidateSignedAuthBlockTask.java3
4 files changed, 19 insertions, 4 deletions
diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/CreateSAML1AssertionTask.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/CreateSAML1AssertionTask.java
index 7e56071bd..ebda3c5c3 100644
--- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/CreateSAML1AssertionTask.java
+++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/CreateSAML1AssertionTask.java
@@ -1,5 +1,6 @@
package at.gv.egovernment.moa.id.process.spring.test.task;
+import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.util.Objects;
@@ -8,6 +9,7 @@ import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException;
import at.gv.egovernment.moa.id.process.api.ExecutionContext;
import at.gv.egovernment.moa.id.process.api.Task;
@@ -37,7 +39,7 @@ public class CreateSAML1AssertionTask implements Task {
private Logger log = LoggerFactory.getLogger(getClass());
@Override
- public void execute(ExecutionContext executionContext) throws Exception {
+ public void execute(ExecutionContext executionContext) throws TaskExecutionException {
Objects.requireNonNull(executionContext.get("IdentityLink"));
assert (Boolean.TRUE.equals(Objects.requireNonNull(executionContext.get("isIdentityLinkValidated"))));
Objects.requireNonNull(executionContext.get("SignedAuthBlock"));
@@ -47,6 +49,9 @@ public class CreateSAML1AssertionTask implements Task {
try (InputStream in = getClass().getResourceAsStream("SAML1Assertion.xml")) {
executionContext.put("SAML1Assertion", IOUtils.toString(in, Charset.forName("UTF-8")));
+
+ } catch (IOException e) {
+ throw new TaskExecutionException("", e);
}
}
diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/GetIdentityLinkTask.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/GetIdentityLinkTask.java
index 412fb0123..bd08ec6a1 100644
--- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/GetIdentityLinkTask.java
+++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/GetIdentityLinkTask.java
@@ -9,6 +9,7 @@ import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException;
import at.gv.egovernment.moa.id.process.api.ExecutionContext;
import at.gv.egovernment.moa.id.process.api.Task;
@@ -37,13 +38,16 @@ public class GetIdentityLinkTask implements Task {
private Logger log = LoggerFactory.getLogger(getClass());
@Override
- public void execute(ExecutionContext executionContext) throws IOException {
+ public void execute(ExecutionContext executionContext) throws TaskExecutionException {
Objects.requireNonNull(executionContext.get("bkuURL"));
log.debug("Using bkuURL in order to retrieve IdentityLink.");
try (InputStream in = getClass().getResourceAsStream("IdentityLink_Max_Mustermann.xml")) {
executionContext.put("IdentityLink", IOUtils.toString(in, Charset.forName("UTF-8")));
+
+ } catch (IOException e) {
+ throw new TaskExecutionException("", e);
}
}
diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/SignAuthBlockTask.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/SignAuthBlockTask.java
index 8099c0f98..8f9b72cea 100644
--- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/SignAuthBlockTask.java
+++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/SignAuthBlockTask.java
@@ -1,5 +1,6 @@
package at.gv.egovernment.moa.id.process.spring.test.task;
+import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.util.Objects;
@@ -8,6 +9,7 @@ import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException;
import at.gv.egovernment.moa.id.process.api.ExecutionContext;
import at.gv.egovernment.moa.id.process.api.Task;
@@ -38,7 +40,7 @@ public class SignAuthBlockTask implements Task {
private Logger log = LoggerFactory.getLogger(getClass());
@Override
- public void execute(ExecutionContext executionContext) throws Exception {
+ public void execute(ExecutionContext executionContext) throws TaskExecutionException {
Objects.requireNonNull(executionContext.get("IdentityLink"));
assert (Boolean.TRUE.equals(Objects.requireNonNull(executionContext.get("isIdentityLinkValidated"))));
Objects.requireNonNull(executionContext.get("bkuURL"));
@@ -46,6 +48,9 @@ public class SignAuthBlockTask implements Task {
log.debug("Using validated IdentityLink and bkuURL in order to sign auth block.");
try (InputStream in = getClass().getResourceAsStream("SignedAuthBlock.xml")) {
executionContext.put("SignedAuthBlock", IOUtils.toString(in, Charset.forName("UTF-8")));
+ } catch (IOException e) {
+ throw new TaskExecutionException("", e);
+
}
}
diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/ValidateSignedAuthBlockTask.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/ValidateSignedAuthBlockTask.java
index 07b2ea69c..cece373d4 100644
--- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/ValidateSignedAuthBlockTask.java
+++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/ValidateSignedAuthBlockTask.java
@@ -5,6 +5,7 @@ import java.util.Objects;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException;
import at.gv.egovernment.moa.id.process.api.ExecutionContext;
import at.gv.egovernment.moa.id.process.api.Task;
@@ -33,7 +34,7 @@ public class ValidateSignedAuthBlockTask implements Task {
private Logger log = LoggerFactory.getLogger(getClass());
@Override
- public void execute(ExecutionContext executionContext) throws Exception {
+ public void execute(ExecutionContext executionContext) throws TaskExecutionException {
Objects.requireNonNull(executionContext.get("IdentityLink"));
assert (Boolean.TRUE.equals(Objects.requireNonNull(executionContext.get("isIdentityLinkValidated"))));
Objects.requireNonNull(executionContext.get("SignedAuthBlock"));