aboutsummaryrefslogtreecommitdiff
path: root/id
diff options
context:
space:
mode:
Diffstat (limited to 'id')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java4
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/AttributeHelper.java3
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java28
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java2
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java2
-rw-r--r--id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp7
-rw-r--r--id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd15
7 files changed, 34 insertions, 27 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java
index 854334bed..ce4803978 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralStorkConfig.java
@@ -34,12 +34,14 @@ public class GeneralStorkConfig {
cpepslist.add(current);
}
- List<StorkAttribute> tmp = stork.getRequestedAttributes();
+ List<StorkAttribute> tmp = stork.getAttributes();
if(null != tmp) {
attributes = new ArrayList<StorkAttribute>();
for(StorkAttribute current : tmp)
attributes.add(current);
}
+ if(attributes.isEmpty())
+ attributes.add(new StorkAttribute());
try {
qaa = stork.getQualityAuthenticationAssuranceLevel();
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/AttributeHelper.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/AttributeHelper.java
index 1590918c6..349f3bf4a 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/AttributeHelper.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/AttributeHelper.java
@@ -15,9 +15,8 @@ public class AttributeHelper {
public AttributeHelper(OAStorkAttribute attribute) {
isUsed = true;
- name = attribute.getAttribute().getName();
+ name = attribute.getName();
mandatory = attribute.isMandatory();
- readonly = attribute.getAttribute().isMandatory();
}
public AttributeHelper(StorkAttribute attribute) {
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java
index 42501b4d1..10ebbe112 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java
@@ -43,11 +43,11 @@ public class OASTORKConfig {
// prepare attribute helper list
attributes = new ArrayList<AttributeHelper>();
- for(StorkAttribute current : ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getRequestedAttributes()) {
+ for(StorkAttribute current : ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getAttributes()) {
AttributeHelper tmp = null;
- for(OAStorkAttribute sepp : config.getAttributes())
- if(sepp.getAttribute().equals(current))
+ for(OAStorkAttribute sepp : config.getOAAttributes())
+ if(sepp.getName().equals(current.getName()))
tmp = new AttributeHelper(sepp);
if(null == tmp)
@@ -77,15 +77,21 @@ public class OASTORKConfig {
public List<OAStorkAttribute> getAttributes() {
List<OAStorkAttribute> result = new ArrayList<OAStorkAttribute>();
+
+ if(null == getHelperAttributes())
+ return result;
+
for(AttributeHelper current : getHelperAttributes()) {
- if(current.isUsed()) {
- OAStorkAttribute tmp = new OAStorkAttribute();
- for(StorkAttribute currentAttribute : ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getRequestedAttributes())
- if(currentAttribute.getName().equals(current.getName()))
- tmp.setAttribute(currentAttribute);
- tmp.setMandatory(current.isMandatory());
- result.add(tmp);
- }
+ for(StorkAttribute currentAttribute : ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getAttributes())
+ if(currentAttribute.getName().equals(current.getName())) {
+ if(current.isUsed() || currentAttribute.isMandatory()) {
+ OAStorkAttribute tmp = new OAStorkAttribute();
+ tmp.setName(current.getName());
+ tmp.setMandatory(current.isMandatory());
+ result.add(tmp);
+ }
+ break;
+ }
}
return result;
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 1de440506..1c0cc5c89 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
@@ -398,7 +398,7 @@ public class EditGeneralConfigAction extends ActionSupport
oldstork = new STORK();
oldstork.setQualityAuthenticationAssuranceLevel(storkconfig.getDefaultQaa());
- oldstork.setRequestedAttributes(storkconfig.getAttributes());
+ oldstork.setAttributes(storkconfig.getAttributes());
oldstork.setCPEPS(storkconfig.getCpepslist());
dbforeign.setSTORK(oldstork);
}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
index 59d5f7302..ca027e578 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
@@ -968,7 +968,7 @@ public class EditOAAction extends ActionSupport implements ServletRequestAware,
// transfer the incoming data to the database model
stork.setStorkLogonEnabled(storkOA.isStorkLogonEnabled());
stork.setQaa(storkOA.getQaa());
- stork.setAttributes(storkOA.getAttributes());
+ stork.setOAAttributes(storkOA.getAttributes());
try {
if (newentry) {
diff --git a/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp b/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp
index 413298724..b58b997ec 100644
--- a/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp
+++ b/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp
@@ -322,10 +322,9 @@
<table>
<tr><th>verwendet</th><th>Attributname</th><th>mandatory</th></tr>
<s:iterator value="storkOA.helperAttributes" status="stat">
- <tr><td><s:checkbox name="storkOA.helperAttributes[%{#stat.index}].used" value="%{used}" disabled="%{readOnly}" /><s:hidden name="storkOA.helperAttributes[%{#stat.index}].name" value="%{name}" /></td>
- <td><s:property value="%{name}" /></td>
- <td><s:checkbox name="storkOA.helperAttributes[%{#stat.index}].mandatory" value="%{mandatory}" /></td>
- <td><input type="button" value="<%=LanguageHelper.getGUIString("webpages.moaconfig.stork.attributes.remove", request) %>" onclick='this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);'/></td></tr>
+ <tr><td><s:checkbox name="storkOA.helperAttributes[%{#stat.index}].used" value="%{used}" disabled="%{readOnly}" /></td>
+ <td><s:property value="%{name}" /><s:hidden name="storkOA.helperAttributes[%{#stat.index}].name" value="%{name}" /></td>
+ <td><s:checkbox name="storkOA.helperAttributes[%{#stat.index}].mandatory" value="%{mandatory}" /></td></tr>
</s:iterator>
</table>
</div>
diff --git a/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd b/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd
index 6972b031c..3ed7c936a 100644
--- a/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd
+++ b/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd
@@ -72,8 +72,6 @@
</xsd:simpleType>
<xsd:element name="QualityAuthenticationAssuranceLevel" type="QualityAuthenticationAssuranceLevelType"/>
<xsd:element name="AttributeValue" type="xsd:anyType"/>
- <xsd:complexType name="RequestedAttributeType"/>
- <xsd:element name="RequestedAttribute" type="RequestedAttributeType"/>
<xsd:simpleType name="CountryCodeType">
<xsd:restriction base="xsd:token">
<xsd:pattern value="[A-Z]{2}"/>
@@ -85,7 +83,6 @@
<xsd:element name="mandatory" type="xsd:boolean"></xsd:element>
</xsd:sequence>
</xsd:complexType>
- <xsd:element name="RequestedAttributes" type="StorkAttribute"/>
<xsd:simpleType name="LoginType">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="stateless"/>
@@ -853,8 +850,10 @@
<xsd:element ref="SAMLSigningParameter"/>
</xsd:sequence>
<xsd:sequence>
- <xsd:element ref="QualityAuthenticationAssuranceLevel" minOccurs="0"/>
- <xsd:element ref="RequestedAttributes" maxOccurs="unbounded" minOccurs="1"/>
+ <xsd:element ref="QualityAuthenticationAssuranceLevel" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:sequence>
+ <xsd:element ref="Attributes" maxOccurs="unbounded" minOccurs="0" />
</xsd:sequence>
</xsd:choice>
</xsd:complexType>
@@ -924,7 +923,7 @@
<xsd:element name="StorkLogonEnabled"
type="xsd:boolean" />
<xsd:element ref="Qaa" maxOccurs="1" minOccurs="0"></xsd:element>
- <xsd:element name="Attributes" type="OAStorkAttribute" maxOccurs="unbounded" minOccurs="1"></xsd:element>
+ <xsd:element ref="OAAttributes" maxOccurs="unbounded" minOccurs="0"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
@@ -996,8 +995,10 @@
<xsd:complexType name="OAStorkAttribute">
<xsd:sequence>
- <xsd:element name="attribute" type="StorkAttribute"></xsd:element>
<xsd:element name="mandatory" type="xsd:boolean"></xsd:element>
+ <xsd:element name="name" type="xsd:string"></xsd:element>
</xsd:sequence>
</xsd:complexType>
+
+ <xsd:element name="OAAttributes" type="OAStorkAttribute"></xsd:element>
</xsd:schema>