From e7842b994f4dd5d4e8ad88a4db8ddf23707714cf Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 13 Jun 2014 11:32:31 +0200 Subject: add new test credential support to web config gui --- .../data/oa/OAAuthenticationData.java | 68 +++++++++++++++++++++- .../oa/OAAuthenticationDataValidation.java | 12 ++++ .../resources/applicationResources_de.properties | 5 ++ .../resources/applicationResources_en.properties | 6 +- .../main/webapp/jsp/snippets/OA/authentication.jsp | 20 +++++++ 5 files changed, 108 insertions(+), 3 deletions(-) (limited to 'id') diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAAuthenticationData.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAAuthenticationData.java index cb60a21a0..0e65b7dca 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAAuthenticationData.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAAuthenticationData.java @@ -30,17 +30,16 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; import at.gv.egovernment.moa.id.commons.db.ConfigurationDBRead; -import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils; import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentOA; import at.gv.egovernment.moa.id.commons.db.dao.config.BKUURLS; import at.gv.egovernment.moa.id.commons.db.dao.config.DefaultBKUs; import at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration; import at.gv.egovernment.moa.id.commons.db.dao.config.MOAKeyBoxSelector; import at.gv.egovernment.moa.id.commons.db.dao.config.Mandates; -import at.gv.egovernment.moa.id.commons.db.dao.config.MandatesProfileNameItem; import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication; import at.gv.egovernment.moa.id.commons.db.dao.config.TemplateType; import at.gv.egovernment.moa.id.commons.db.dao.config.TemplatesType; +import at.gv.egovernment.moa.id.commons.db.dao.config.TestCredentials; import at.gv.egovernment.moa.id.commons.db.dao.config.TransformsInfoType; import at.gv.egovernment.moa.id.configuration.Constants; import at.gv.egovernment.moa.id.configuration.auth.AuthenticatedUser; @@ -70,6 +69,9 @@ public class OAAuthenticationData implements IOnlineApplicationData { private Map transformations; + private boolean enableTestCredentials = false; + private List testCredentialOIDs = null; + /** * */ @@ -204,6 +206,12 @@ public class OAAuthenticationData implements IOnlineApplicationData { } } + if (oaauth.getTestCredentials() != null) { + enableTestCredentials = oaauth.getTestCredentials().isEnableTestCredentials(); + testCredentialOIDs = oaauth.getTestCredentials().getCredentialOID(); + + } + return null; } @@ -305,6 +313,16 @@ public class OAAuthenticationData implements IOnlineApplicationData { } + if (enableTestCredentials) { + TestCredentials testing = authoa.getTestCredentials(); + if (testing == null) + testing = new TestCredentials(); + + testing.setEnableTestCredentials(enableTestCredentials); + testing.setCredentialOID(testCredentialOIDs); + + } + return null; } @@ -538,5 +556,51 @@ public class OAAuthenticationData implements IOnlineApplicationData { SLTemplates = new ArrayList(); SLTemplates.add(sLTemplateURL3); } + + /** + * @return the enableTestCredentials + */ + public boolean isEnableTestCredentials() { + return enableTestCredentials; + } + + /** + * @param enableTestCredentials the enableTestCredentials to set + */ + public void setEnableTestCredentials(boolean enableTestCredentials) { + this.enableTestCredentials = enableTestCredentials; + } + + /** + * @return the testCredentialOIDs + */ + public String getTestCredentialOIDs() { + String value = null; + for (String el : testCredentialOIDs) { + if (value == null) + value = el; + else + value += "," + el; + + } + + return value; + } + + public List getTestCredialOIDList() { + return this.testCredentialOIDs; + } + + /** + * @param testCredentialOIDs the testCredentialOIDs to set + */ + public void setTestCredentialOIDs(String testCredentialOIDs) { + String[] oidList = testCredentialOIDs.split(","); + + this.testCredentialOIDs = new ArrayList(); + for (int i=0; i +
+

<%=LanguageHelper.getGUIString("webpages.oaconfig.general.testing.header", request) %>

+ + + + + + + +
+ +

<%=LanguageHelper.getGUIString("webpages.oaconfig.general.mandate.header", request) %>

-- cgit v1.2.3