Index: lams_build/build_base.xml =================================================================== diff -u -r2c03060b238558d183472f0066ba003c76d00fd0 -r999d7eabc9fab6a6831ee3d154dcc9a02ca3dc58 --- lams_build/build_base.xml (.../build_base.xml) (revision 2c03060b238558d183472f0066ba003c76d00fd0) +++ lams_build/build_base.xml (.../build_base.xml) (revision 999d7eabc9fab6a6831ee3d154dcc9a02ca3dc58) @@ -234,7 +234,7 @@ - + ${ant.project.name}: Building WAR @@ -365,7 +365,15 @@ + + + + ${ant.project.name}: Copying deployment handler + + + Index: lams_build/conf/deployment-handler/io.undertow.servlet.ServletExtension =================================================================== diff -u --- lams_build/conf/deployment-handler/io.undertow.servlet.ServletExtension (revision 0) +++ lams_build/conf/deployment-handler/io.undertow.servlet.ServletExtension (revision 999d7eabc9fab6a6831ee3d154dcc9a02ca3dc58) @@ -0,0 +1 @@ +org.lamsfoundation.lams.integration.security.CommonDeploymentHandler \ No newline at end of file Index: lams_build/conf/host.xml =================================================================== diff -u -r730e8d7952106eb6bd491466fba4e676a48397cc -r999d7eabc9fab6a6831ee3d154dcc9a02ca3dc58 --- lams_build/conf/host.xml (.../host.xml) (revision 730e8d7952106eb6bd491466fba4e676a48397cc) +++ lams_build/conf/host.xml (.../host.xml) (revision 999d7eabc9fab6a6831ee3d154dcc9a02ca3dc58) @@ -87,18 +87,23 @@ - + + + + + + - Index: lams_common/src/java/org/lamsfoundation/lams/integration/security/CommonDeploymentHandler.java =================================================================== diff -u --- lams_common/src/java/org/lamsfoundation/lams/integration/security/CommonDeploymentHandler.java (revision 0) +++ lams_common/src/java/org/lamsfoundation/lams/integration/security/CommonDeploymentHandler.java (revision 999d7eabc9fab6a6831ee3d154dcc9a02ca3dc58) @@ -0,0 +1,45 @@ +/** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + */ +package org.lamsfoundation.lams.integration.security; + +import javax.servlet.ServletContext; + +import io.undertow.servlet.ServletExtension; +import io.undertow.servlet.api.DeploymentInfo; + +/** + * Sets deployment configuration for all LAMS modules. Central has its own SsoHandler. + * + * @author Marcin Cieslak + * + */ +public class CommonDeploymentHandler implements ServletExtension { + @Override + public void handleDeployment(final DeploymentInfo deploymentInfo, final ServletContext servletContext) { + // If WildFly was run with VM parameter -Dlams.keepSessionId=true + // session ID will not be changed after log in + // This is necessary for TestHarness to run as it does not process session ID change correctly + boolean keepSessionId = Boolean.parseBoolean(System.getProperty(SsoHandler.KEEP_SESSION_ID_KEY)); + if (keepSessionId) { + deploymentInfo.setChangeSessionIdOnLogin(false); + } + } +} \ No newline at end of file Index: lams_common/src/java/org/lamsfoundation/lams/integration/security/SsoHandler.java =================================================================== diff -u -r131ce42e64069f574a2a4a9bc1e5c4be4918e5bb -r999d7eabc9fab6a6831ee3d154dcc9a02ca3dc58 --- lams_common/src/java/org/lamsfoundation/lams/integration/security/SsoHandler.java (.../SsoHandler.java) (revision 131ce42e64069f574a2a4a9bc1e5c4be4918e5bb) +++ lams_common/src/java/org/lamsfoundation/lams/integration/security/SsoHandler.java (.../SsoHandler.java) (revision 999d7eabc9fab6a6831ee3d154dcc9a02ca3dc58) @@ -57,7 +57,7 @@ import io.undertow.util.Headers; /** - * Allows access to LAMS WARs when an user logs in. + * Allows access to other LAMS modules when an user logs in Central. * * @author Marcin Cieslak * @@ -67,7 +67,7 @@ private static IUserManagementService userManagementService = null; private static final String REDIRECT_KEY = "io.undertow.servlet.form.auth.redirect.location"; - private static final String KEEP_SESSION_ID_KEY = "lams.keepSessionId"; + static final String KEEP_SESSION_ID_KEY = "lams.keepSessionId"; @Override public void handleDeployment(final DeploymentInfo deploymentInfo, final ServletContext servletContext) {