diff options
Diffstat (limited to 'id')
-rw-r--r-- | id/server/auth/src/main/webapp/WEB-INF/web.xml | 9 | ||||
-rw-r--r-- | id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKWebApplicationInitializer.java | 19 |
2 files changed, 23 insertions, 5 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 41c46bd22..930b10f43 100644 --- a/id/server/auth/src/main/webapp/WEB-INF/web.xml +++ b/id/server/auth/src/main/webapp/WEB-INF/web.xml @@ -137,16 +137,23 @@ <servlet-class>at.gv.egovernment.moa.id.auth.servlet.ProcessEngineSignalServlet</servlet-class> </servlet> <servlet-mapping> + <!-- do not change this servlet-name --> <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 (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 --> + + <!-- + STORK servlet mappings; automatically registered by the stork module; + refer to at.gv.egovernment.moa.id.auth.modules.stork.STORKWebApplicationInitializer + --> <!-- <url-pattern>/PEPSConnectorWithLocalSigning</url-pattern> <url-pattern>/PEPSConnector</url-pattern> diff --git a/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKWebApplicationInitializer.java b/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKWebApplicationInitializer.java index 7478a57c3..c54c9a26d 100644 --- a/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKWebApplicationInitializer.java +++ b/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/STORKWebApplicationInitializer.java @@ -4,6 +4,8 @@ import javax.servlet.ServletContext; import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.web.WebApplicationInitializer;
import at.gv.egovernment.moa.id.auth.servlet.ProcessEngineSignalServlet;
@@ -23,15 +25,24 @@ import at.gv.egovernment.moa.id.auth.servlet.ProcessEngineSignalServlet; * @see ProcessEngineSignalServlet
*/
public class STORKWebApplicationInitializer implements WebApplicationInitializer {
+
+ private Logger log = LoggerFactory.getLogger(getClass());
+
+ private static final String SIGNAL_SERVLET_NAME = "ProcessEngineSignal";
+
+ private void addMapping(ServletRegistration servletRegistration, String mapping) {
+ log.debug("Adding mapping '{}' to servlet '{}' ({}).", mapping, SIGNAL_SERVLET_NAME, servletRegistration.getClassName());
+ servletRegistration.addMapping(mapping);
+ }
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
- ServletRegistration servletRegistration = servletContext.getServletRegistration("ProcessEngineSignal");
+ ServletRegistration servletRegistration = servletContext.getServletRegistration(SIGNAL_SERVLET_NAME);
if (servletRegistration == null) {
- throw new IllegalStateException("Servlet 'ProcessEngineSignal' expected to be registered.");
+ throw new IllegalStateException("Servlet '" + SIGNAL_SERVLET_NAME + "' expected to be registered (e.g. by web.xml).");
}
- servletRegistration.addMapping("/PEPSConnectorWithLocalSigning");
- servletRegistration.addMapping("/PEPSConnector");
+ addMapping(servletRegistration, "/PEPSConnectorWithLocalSigning");
+ addMapping(servletRegistration, "/PEPSConnector");
}
}
|