aboutsummaryrefslogtreecommitdiff
path: root/id/server
diff options
context:
space:
mode:
authorFlorian Reimair <florian.reimair@iaik.tugraz.at>2014-03-12 09:59:19 +0100
committerFlorian Reimair <florian.reimair@iaik.tugraz.at>2014-03-12 10:03:55 +0100
commit4ade7db6124eec07aebf087721d3d478f92bdaad (patch)
treeb9e7d85ea8ebe330ef57597dc383e9e5564ea8db /id/server
parenteb993b9da5938138373a3ad4a619bf2e290c6cfc (diff)
downloadmoa-id-spss-4ade7db6124eec07aebf087721d3d478f92bdaad.tar.gz
moa-id-spss-4ade7db6124eec07aebf087721d3d478f92bdaad.tar.bz2
moa-id-spss-4ade7db6124eec07aebf087721d3d478f92bdaad.zip
added consent-checkbox to config ui
Diffstat (limited to 'id/server')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java5
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java7
-rw-r--r--id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd13
3 files changed, 19 insertions, 6 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java
index d1de20c4d..31ba64be0 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java
@@ -67,7 +67,6 @@ import at.gv.egovernment.moa.id.commons.db.dao.config.TemplatesType;
import at.gv.egovernment.moa.id.commons.db.dao.config.TransformsInfoType;
import at.gv.egovernment.moa.id.config.ConfigurationUtils;
import at.gv.egovernment.moa.id.config.OAParameter;
-import at.gv.egovernment.moa.id.protocols.stork2.AttributeProvider;
import at.gv.egovernment.moa.id.util.FormBuildUtils;
import at.gv.egovernment.moa.logging.Logger;
import at.gv.egovernment.moa.util.MiscUtil;
@@ -350,6 +349,10 @@ public List<OAStorkAttribute> getRequestedAttributes() {
return oa_auth.getOASTORK().getOAAttributes();
}
+public boolean isRequireConsentForStorkAttributes() {
+ return oa_auth.getOASTORK().isRequireConsent();
+}
+
public List<AttributeProviderPlugin> getStorkAPs() {
return oa_auth.getOASTORK().getAttributeProviders();
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java
index 5d972ba00..7dbbb5734 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java
@@ -148,7 +148,12 @@ public class AttributeCollector implements IAction {
// else, update any existing attributes
addOrUpdateAll(container.getResponse().getPersonalAttributeList(), aquiredAttributes);
}
- new ConsentEvaluatorSepp().requestConsent(container, response, oaParam);
+
+ // ask for consent if necessary
+ if(oaParam.isRequireConsentForStorkAttributes())
+ new ConsentEvaluator().requestConsent(container, response, oaParam);
+ else
+ new ConsentEvaluator().generateSTORKResponse(response, container);
return "12345"; // AssertionId
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 b7e8f6ff3..936363169 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
@@ -883,11 +883,16 @@
<xsd:element name="OA_STORK">
<xsd:complexType>
<xsd:sequence>
- <xsd:element name="StorkLogonEnabled" type="xsd:boolean"/>
- <xsd:element ref="Qaa" minOccurs="0" maxOccurs="1"/>
- <xsd:element ref="OAAttributes" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="StorkLogonEnabled"
+ type="xsd:boolean" />
+ <xsd:element ref="Qaa" minOccurs="0" maxOccurs="1" />
+ <xsd:element ref="OAAttributes" minOccurs="0"
+ maxOccurs="unbounded" />
<xsd:element name="VidpEnabled" type="xsd:boolean"></xsd:element>
- <xsd:element ref="AttributeProviders" maxOccurs="unbounded" minOccurs="0"></xsd:element>
+ <xsd:element ref="AttributeProviders"
+ maxOccurs="unbounded" minOccurs="0">
+ </xsd:element>
+ <xsd:element name="requireConsent" type="xsd:boolean"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>