From fd2752d6cb5a95aca7ed2206a9b8258942f17655 Mon Sep 17 00:00:00 2001 From: Thomas Knall Date: Mon, 23 Feb 2015 18:57:12 +0100 Subject: 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. --- .../stork/STORKProcessEngineSignalServletTest.java | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 id/server/modules/module-stork/src/test/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKProcessEngineSignalServletTest.java (limited to 'id/server/modules/module-stork/src/test/java') 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)); + } + + } + +} -- cgit v1.2.3