aboutsummaryrefslogtreecommitdiff
path: root/id/server
diff options
context:
space:
mode:
Diffstat (limited to 'id/server')
-rw-r--r--id/server/auth/src/main/webapp/WEB-INF/web.xml5
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKWebApplicationInitializer.java37
-rw-r--r--id/server/idserverlib/src/main/resources/at/gv/egovernment/moa/id/auth/modules/stork/STORK.authmodule.beans.xml (renamed from id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/STORK.authmodule.beans.xml)0
3 files changed, 41 insertions, 1 deletions
diff --git a/id/server/auth/src/main/webapp/WEB-INF/web.xml b/id/server/auth/src/main/webapp/WEB-INF/web.xml
index f81e01ccd..41c46bd22 100644
--- a/id/server/auth/src/main/webapp/WEB-INF/web.xml
+++ b/id/server/auth/src/main/webapp/WEB-INF/web.xml
@@ -140,14 +140,17 @@
<servlet-name>ProcessEngineSignal</servlet-name>
<!-- Use this url-pattern in order to signal the next (asynchronous) task. -->
<url-pattern>/signalProcess</url-pattern>
- <!-- legacy url patterns for asynchronous tasks -->
+ <!-- legacy url patterns for asynchronous tasks (internal default module/processes) -->
<url-pattern>/GetMISSessionID</url-pattern>
<url-pattern>/GetForeignID</url-pattern>
<url-pattern>/VerifyAuthBlock</url-pattern>
<url-pattern>/VerifyCertificate</url-pattern>
<url-pattern>/VerifyIdentityLink</url-pattern>
+ <!-- STORK servlet mappings; automatically registered by the stork module -->
+ <!--
<url-pattern>/PEPSConnectorWithLocalSigning</url-pattern>
<url-pattern>/PEPSConnector</url-pattern>
+ -->
</servlet-mapping>
<session-config>
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKWebApplicationInitializer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKWebApplicationInitializer.java
new file mode 100644
index 000000000..7478a57c3
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKWebApplicationInitializer.java
@@ -0,0 +1,37 @@
+package at.gv.egovernment.moa.id.auth.modules.stork;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRegistration;
+
+import org.springframework.web.WebApplicationInitializer;
+
+import at.gv.egovernment.moa.id.auth.servlet.ProcessEngineSignalServlet;
+
+/**
+ * Spring automatically discovers {@link WebApplicationInitializer} implementations at startup.<br/>
+ * This STORK webapp initializer adds the required servlet mappings:
+ * <ul>
+ * <li>{@code /PEPSConnector}</li>
+ * <li>{@code /PEPSConnectorWithLocalSigning}</li>
+ * </ul>
+ * for the {@linkplain ProcessEngineSignalServlet process engine servlet} (named {@code ProcessEngineSignal}) that wakes
+ * up a process in order to execute asynchronous tasks. Therefore the servlet mappings mentioned above do not need to be
+ * declared in {@code web.xml}.
+ *
+ * @author tknall
+ * @see ProcessEngineSignalServlet
+ */
+public class STORKWebApplicationInitializer implements WebApplicationInitializer {
+
+ @Override
+ public void onStartup(ServletContext servletContext) throws ServletException {
+ ServletRegistration servletRegistration = servletContext.getServletRegistration("ProcessEngineSignal");
+ if (servletRegistration == null) {
+ throw new IllegalStateException("Servlet 'ProcessEngineSignal' expected to be registered.");
+ }
+ servletRegistration.addMapping("/PEPSConnectorWithLocalSigning");
+ servletRegistration.addMapping("/PEPSConnector");
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/STORK.authmodule.beans.xml b/id/server/idserverlib/src/main/resources/at/gv/egovernment/moa/id/auth/modules/stork/STORK.authmodule.beans.xml
index 2e924bdd0..2e924bdd0 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/STORK.authmodule.beans.xml
+++ b/id/server/idserverlib/src/main/resources/at/gv/egovernment/moa/id/auth/modules/stork/STORK.authmodule.beans.xml