aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2017-02-08 15:59:45 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2017-02-08 15:59:45 +0100
commitbe8d392611fe2ed733869a4a9701904313a207fd (patch)
tree5759a1bb426fd500d4f15dd7cf82381e10916953 /id/server/modules
parent16645606a6e2e6c1b00b2b20ef0373e2c81f7f4a (diff)
downloadmoa-id-spss-be8d392611fe2ed733869a4a9701904313a207fd.tar.gz
moa-id-spss-be8d392611fe2ed733869a4a9701904313a207fd.tar.bz2
moa-id-spss-be8d392611fe2ed733869a4a9701904313a207fd.zip
update eIDAS assertion generation to generate an error message if attribute that is marked as required is not available
Diffstat (limited to 'id/server/modules')
-rw-r--r--id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/eIDASAuthenticationRequest.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/eIDASAuthenticationRequest.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/eIDASAuthenticationRequest.java
index 97241af6a..f0e7e918b 100644
--- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/eIDASAuthenticationRequest.java
+++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/eIDASAuthenticationRequest.java
@@ -145,8 +145,14 @@ public class eIDASAuthenticationRequest implements IAction {
}
- if(MiscUtil.isEmpty(newValue)) {
- Logger.info("eIDAS Attr:" + attr.getNameUri() + " is not available.");
+ if(MiscUtil.isEmpty(newValue)) {
+ if (attr.isRequired()) {
+ Logger.info("eIDAS Attr:" + attr.getNameUri() + " is marked as 'Required' but not available.");
+ throw new MOAIDException("eIDAS.15", new Object[]{attr.getFriendlyName()});
+
+ } else
+ Logger.info("eIDAS Attr:" + attr.getNameUri() + " is not available.");
+
} else {
//set uniqueIdentifier attribute, because eIDAS SAMLEngine use this flag to select the