aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at
diff options
context:
space:
mode:
authorFlorian Reimair <florian.reimair@iaik.tugraz.at>2014-02-13 18:01:30 +0100
committerFlorian Reimair <florian.reimair@iaik.tugraz.at>2014-02-13 22:06:02 +0100
commitf3149ae480fac3e12f9a98cba07d11e297cf39f0 (patch)
tree61077933b21bccb68104cdcaaa10c1a76bd40fd4 /id/server/idserverlib/src/main/java/at
parentdcb3a469f10ef2d30d34c50983224db9d9fd85c6 (diff)
downloadmoa-id-spss-f3149ae480fac3e12f9a98cba07d11e297cf39f0.tar.gz
moa-id-spss-f3149ae480fac3e12f9a98cba07d11e297cf39f0.tar.bz2
moa-id-spss-f3149ae480fac3e12f9a98cba07d11e297cf39f0.zip
fetch DataContainer from AssertionStore
Diffstat (limited to 'id/server/idserverlib/src/main/java/at')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java10
1 files changed, 9 insertions, 1 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 0025307dd..b333fb4fe 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
@@ -5,6 +5,7 @@ import java.util.List;
import at.gv.egovernment.moa.id.auth.data.AuthenticationSession;
import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
+import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
import at.gv.egovernment.moa.id.moduls.IAction;
import at.gv.egovernment.moa.id.moduls.IRequest;
import at.gv.egovernment.moa.id.storage.AssertionStorage;
@@ -55,7 +56,14 @@ public class AttributeCollector implements IAction {
// yes, we got a recent requested attribute
// - find the attribute provider plugin that can handle the response
// - fetch the container
- DataContainer container = new DataContainer();
+ String artifactId = (String) httpReq.getAttribute(ARTIFACT_ID);
+ DataContainer container;
+ try {
+ container = AssertionStorage.getInstance().get(artifactId, DataContainer.class);
+ } catch (MOADatabaseException e) {
+ Logger.error("Error fetching incomplete Stork response from temporary storage. Most likely a timeout occured.", e);
+ throw new MOAIDException("stork.11", null);
+ }
// - insert the embedded attribute(s) into the container
// see if we need some more attributes