aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java9
1 files changed, 6 insertions, 3 deletions
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 08244ab38..3b78ef37c 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
@@ -79,7 +79,7 @@ public class AttributeCollector implements IAction {
container.getResponse().getPersonalAttributeList().add(current);
// see if we need some more attributes
- return processRequest(container, httpReq, httpResp, oaParam);
+ return processRequest(container, httpReq, httpResp, moasession, oaParam);
}
/**
@@ -90,7 +90,7 @@ public class AttributeCollector implements IAction {
* @return the string
* @throws MOAIDException
*/
- public String processRequest(DataContainer container, HttpServletRequest request, HttpServletResponse response, OAAuthParameter oaParam) throws MOAIDException {
+ public String processRequest(DataContainer container, HttpServletRequest request, HttpServletResponse response, AuthenticationSession moasession, OAAuthParameter oaParam) throws MOAIDException {
// check if there are attributes we need to fetch
IPersonalAttributeList requestAttributeList = container.getRequest().getPersonalAttributeList();
IPersonalAttributeList responseAttributeList = container.getResponse().getPersonalAttributeList();
@@ -106,13 +106,16 @@ public class AttributeCollector implements IAction {
for (AttributeProvider currentProvider : AttributeProviderFactory.getConfiguredPlugins(oaParam.getStorkAPs())) {
try {
// - hand over control to the suitable plugin
- IPersonalAttributeList aquiredAttributes = currentProvider.acquire(currentAttribute);
+ IPersonalAttributeList aquiredAttributes = currentProvider.acquire(currentAttribute, moasession);
// - add the aquired attribute to the container
for(PersonalAttribute current : aquiredAttributes)
container.getResponse().getPersonalAttributeList().add(current);
} catch(UnsupportedAttributeException e) {
// ok, try the next attributeprovider
+ } catch(MOAIDException e) {
+ // the current plugin had an error. Try the next one.
+ // TODO we might want to add the non-fetchable attribute as "NotAvailable" to prevent an infinite loop
}
}