aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/module-stork/src/test/java/at/gv
diff options
context:
space:
mode:
authorThomas Knall <t.knall@datentechnik-innovation.com>2015-02-23 18:57:12 +0100
committerThomas Knall <t.knall@datentechnik-innovation.com>2015-02-23 18:57:12 +0100
commitfd2752d6cb5a95aca7ed2206a9b8258942f17655 (patch)
treeccdd410f58076c5a4917e97e9307403ea8e6c9a2 /id/server/modules/module-stork/src/test/java/at/gv
parent5e085447e8560df030af5c4a72e6cb17beb6c760 (diff)
downloadmoa-id-spss-fd2752d6cb5a95aca7ed2206a9b8258942f17655.tar.gz
moa-id-spss-fd2752d6cb5a95aca7ed2206a9b8258942f17655.tar.bz2
moa-id-spss-fd2752d6cb5a95aca7ed2206a9b8258942f17655.zip
Improve Process Engine signal servlet (MOAID-73)
- Update Process Engine signal servlet in order to allow module to provider their own strategy for providing the moa session id. - Update moa id handbook. - Update javadoc.
Diffstat (limited to 'id/server/modules/module-stork/src/test/java/at/gv')
-rw-r--r--id/server/modules/module-stork/src/test/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKProcessEngineSignalServletTest.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/id/server/modules/module-stork/src/test/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKProcessEngineSignalServletTest.java b/id/server/modules/module-stork/src/test/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKProcessEngineSignalServletTest.java
new file mode 100644
index 000000000..ab2d3071f
--- /dev/null
+++ b/id/server/modules/module-stork/src/test/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKProcessEngineSignalServletTest.java
@@ -0,0 +1,27 @@
+package at.gv.egovernment.moa.id.auth.modules.stork;
+
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.commons.io.IOUtils;
+import org.junit.Test;
+import org.springframework.mock.web.MockHttpServletRequest;
+
+public class STORKProcessEngineSignalServletTest {
+
+ @Test
+ public void testGetMoaSessionId() throws IOException {
+ try (InputStream in = getClass().getResourceAsStream("SAMLResponse.base64")) {
+ String samlResponse = IOUtils.toString(in);
+
+ MockHttpServletRequest request = new MockHttpServletRequest("GET", "/service/createTransactionId");
+ request.addParameter("SAMLResponse", samlResponse);
+ assertEquals("_f2358f2f4db445bd1ac75ce415d76a95",
+ new STORKProcessEngineSignalServlet().getMoaSessionId(request));
+ }
+
+ }
+
+}