diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2016-05-17 11:27:40 +0200 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2016-05-17 11:27:40 +0200 |
commit | d196dc527712427d9ca865597f713a342ec01209 (patch) | |
tree | 43d9467f12ff7345db61c2dda7829962c15af108 /id/server/idserverlib/src | |
parent | 56521a4773a8bf4722669dc15ecbc450054b22de (diff) | |
download | moa-id-spss-d196dc527712427d9ca865597f713a342ec01209.tar.gz moa-id-spss-d196dc527712427d9ca865597f713a342ec01209.tar.bz2 moa-id-spss-d196dc527712427d9ca865597f713a342ec01209.zip |
use first AttributeConsumingService from PVP metadata if no one is selected in request or marked as default
Diffstat (limited to 'id/server/idserverlib/src')
-rw-r--r-- | id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java index 8ddd2cb39..200429093 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java @@ -208,8 +208,7 @@ public class PVP2AssertionBuilder implements PVPConstants { Integer aIdx = authnRequest.getAttributeConsumingServiceIndex(); int idx = 0; - AttributeConsumingService attributeConsumingService = null; - + AttributeConsumingService attributeConsumingService = null; if (aIdx != null) { idx = aIdx.intValue(); attributeConsumingService = spSSODescriptor @@ -223,6 +222,19 @@ public class PVP2AssertionBuilder implements PVPConstants { } } + /* + * TODO: maybe use first AttributeConsumingService if no is selected + * in request or on service is marked as default + * + */ + if (attributeConsumingService == null ) { + List<AttributeConsumingService> attrConsumingServiceList = spSSODescriptor.getAttributeConsumingServices(); + if (attrConsumingServiceList != null && !attrConsumingServiceList.isEmpty()) + attributeConsumingService = attrConsumingServiceList.get(0); + + } + + if (attributeConsumingService != null) { Iterator<RequestedAttribute> it = attributeConsumingService .getRequestAttributes().iterator(); |