aboutsummaryrefslogtreecommitdiff
path: root/id/ConfigWebTool/src/main/java
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-01-30 15:03:56 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-01-30 15:03:56 +0100
commitd4a8d57e4cd10fc7e427f936983ae7c28aa6eab2 (patch)
tree62b72e347cdfb4514acb1ecd4a487389f566444a /id/ConfigWebTool/src/main/java
parent58bfb68f349ef7695fcf5071204c0c0eebf03807 (diff)
downloadmoa-id-spss-d4a8d57e4cd10fc7e427f936983ae7c28aa6eab2.tar.gz
moa-id-spss-d4a8d57e4cd10fc7e427f936983ae7c28aa6eab2.tar.bz2
moa-id-spss-d4a8d57e4cd10fc7e427f936983ae7c28aa6eab2.zip
add functionality for global authentication protocol activation/deactivation
Diffstat (limited to 'id/ConfigWebTool/src/main/java')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java64
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java19
2 files changed, 83 insertions, 0 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java
index 4da4d3907..c6b9b984a 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java
@@ -40,10 +40,12 @@ import at.gv.egovernment.moa.id.commons.db.dao.config.IdentificationNumber;
import at.gv.egovernment.moa.id.commons.db.dao.config.LegacyAllowed;
import at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration;
import at.gv.egovernment.moa.id.commons.db.dao.config.MOASP;
+import at.gv.egovernment.moa.id.commons.db.dao.config.OAuth;
import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineMandates;
import at.gv.egovernment.moa.id.commons.db.dao.config.Organization;
import at.gv.egovernment.moa.id.commons.db.dao.config.PVP2;
import at.gv.egovernment.moa.id.commons.db.dao.config.Protocols;
+import at.gv.egovernment.moa.id.commons.db.dao.config.SAML1;
import at.gv.egovernment.moa.id.commons.db.dao.config.SLRequestTemplates;
import at.gv.egovernment.moa.id.commons.db.dao.config.SSO;
import at.gv.egovernment.moa.id.commons.db.dao.config.STORK;
@@ -81,6 +83,10 @@ public class GeneralMOAIDConfig {
private String mandateURL = null;
+ private boolean protocolActiveSAML1 = false;
+ private boolean protocolActivePVP21 = true;
+ private boolean protocolActiveOAuth = true;
+
private boolean legacy_saml1 = false;
private boolean legacy_pvp2 = false;
@@ -205,8 +211,23 @@ public class GeneralMOAIDConfig {
legacy_pvp2 = true;
}
+ SAML1 saml1 = protocols.getSAML1();
+ if (saml1 != null) {
+ protocolActiveSAML1 = saml1.isIsActive();
+
+ }
+
+ OAuth oauth = protocols.getOAuth();
+ if (oauth != null) {
+ protocolActiveOAuth = saml1.isIsActive();
+
+ }
+
PVP2 pvp2 = protocols.getPVP2();
if (pvp2 != null) {
+
+ protocolActivePVP21 = pvp2.isIsActive();
+
pvp2PublicUrlPrefix = pvp2.getPublicURLPrefix();
pvp2IssuerName = pvp2.getIssuerName();
@@ -850,6 +871,49 @@ public class GeneralMOAIDConfig {
this.fileUploadFileName = new ArrayList<String>();
this.fileUploadFileName.add(fileUploadFileName);
}
+
+ /**
+ * @return the protocolActiveSAML1
+ */
+ public boolean isProtocolActiveSAML1() {
+ return protocolActiveSAML1;
+ }
+
+ /**
+ * @param protocolActiveSAML1 the protocolActiveSAML1 to set
+ */
+ public void setProtocolActiveSAML1(boolean protocolActiveSAML1) {
+ this.protocolActiveSAML1 = protocolActiveSAML1;
+ }
+
+ /**
+ * @return the protocolActivePVP21
+ */
+ public boolean isProtocolActivePVP21() {
+ return protocolActivePVP21;
+ }
+
+ /**
+ * @param protocolActivePVP21 the protocolActivePVP21 to set
+ */
+ public void setProtocolActivePVP21(boolean protocolActivePVP21) {
+ this.protocolActivePVP21 = protocolActivePVP21;
+ }
+
+ /**
+ * @return the protocolActiveOAuth
+ */
+ public boolean isProtocolActiveOAuth() {
+ return protocolActiveOAuth;
+ }
+
+ /**
+ * @param protocolActiveOAuth the protocolActiveOAuth to set
+ */
+ public void setProtocolActiveOAuth(boolean protocolActiveOAuth) {
+ this.protocolActiveOAuth = protocolActiveOAuth;
+ }
+
}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java
index f1a8c8694..362579c9f 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java
@@ -53,10 +53,12 @@ import at.gv.egovernment.moa.id.commons.db.dao.config.IdentityLinkSigners;
import at.gv.egovernment.moa.id.commons.db.dao.config.LegacyAllowed;
import at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration;
import at.gv.egovernment.moa.id.commons.db.dao.config.MOASP;
+import at.gv.egovernment.moa.id.commons.db.dao.config.OAuth;
import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineMandates;
import at.gv.egovernment.moa.id.commons.db.dao.config.Organization;
import at.gv.egovernment.moa.id.commons.db.dao.config.PVP2;
import at.gv.egovernment.moa.id.commons.db.dao.config.Protocols;
+import at.gv.egovernment.moa.id.commons.db.dao.config.SAML1;
import at.gv.egovernment.moa.id.commons.db.dao.config.SLRequestTemplates;
import at.gv.egovernment.moa.id.commons.db.dao.config.SSO;
import at.gv.egovernment.moa.id.commons.db.dao.config.STORK;
@@ -271,11 +273,28 @@ public class EditGeneralConfigAction extends ActionSupport
el.add(Constants.MOA_CONFIG_PROTOCOL_SAML1);
legprot.setProtocolName(el);
+ SAML1 saml1= dbprotocols.getSAML1();
+ if (saml1 == null) {
+ saml1 = new SAML1();
+ dbprotocols.setSAML1(saml1);
+ }
+ saml1.setIsActive(moaconfig.isProtocolActiveSAML1());
+
+ OAuth oauth= dbprotocols.getOAuth();
+ if (oauth == null) {
+ oauth = new OAuth();
+ dbprotocols.setOAuth(oauth);
+ }
+ oauth.setIsActive(moaconfig.isProtocolActiveOAuth());
+
PVP2 pvp2 = dbprotocols.getPVP2();
if (pvp2 == null) {
pvp2 = new PVP2();
dbprotocols.setPVP2(pvp2);
}
+
+ pvp2.setIsActive(moaconfig.isProtocolActivePVP21());
+
if (MiscUtil.isNotEmpty(moaconfig.getPvp2IssuerName()))
pvp2.setIssuerName(moaconfig.getPvp2IssuerName());
if (MiscUtil.isNotEmpty(moaconfig.getPvp2PublicUrlPrefix()))