aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java
diff options
context:
space:
mode:
authorFlorian Reimair <florian.reimair@iaik.tugraz.at>2014-02-13 17:55:17 +0100
committerFlorian Reimair <florian.reimair@iaik.tugraz.at>2014-02-13 22:06:02 +0100
commitdcb3a469f10ef2d30d34c50983224db9d9fd85c6 (patch)
tree5ae190eb90374cd76d0d2db372e6e1f76bc5ecb5 /id/server/idserverlib/src/main/java
parenta330b17e3ddc93181c8142b7c0ae871af528157f (diff)
downloadmoa-id-spss-dcb3a469f10ef2d30d34c50983224db9d9fd85c6.tar.gz
moa-id-spss-dcb3a469f10ef2d30d34c50983224db9d9fd85c6.tar.bz2
moa-id-spss-dcb3a469f10ef2d30d34c50983224db9d9fd85c6.zip
refactor magic strings to constants
Diffstat (limited to 'id/server/idserverlib/src/main/java')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java12
1 files changed, 9 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 30f7d3df2..0025307dd 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
@@ -29,8 +29,15 @@ import eu.stork.peps.auth.commons.PersonalAttribute;
*/
public class AttributeCollector implements IAction {
+ /** The Constant ARTIFACT_ID. */
+ private static final String ARTIFACT_ID = "artifactId";
+
private ArrayList<AttributeProvider> attributeProviders;
+ /** The return url. */
+ // TODO find correct return URL
+ private String returnUrl = "findCorrectReturnURL";
+
public AttributeCollector() {
// TODO generate from config
attributeProviders = new ArrayList<AttributeProvider>();
@@ -101,8 +108,7 @@ public class AttributeCollector implements IAction {
AssertionStorage.getInstance().put(newArtifactId, container);
// add container-key to redirect embedded within the return URL
- // TODO find correct returnURL
- e.getAp().performRedirect("returnURL");
+ e.getAp().performRedirect(returnUrl + "?" + ARTIFACT_ID + "=" + newArtifactId);
} catch (Exception e1) {
// TODO should we return the response as is to the PEPS?
Logger.error("Error putting incomplete Stork response into temporary storage", e);
@@ -120,7 +126,7 @@ public class AttributeCollector implements IAction {
* @see at.gv.egovernment.moa.id.moduls.IAction#needAuthentication(at.gv.egovernment.moa.id.moduls.IRequest, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
public boolean needAuthentication(IRequest req, HttpServletRequest httpReq, HttpServletResponse httpResp) {
- // this action does not need any authentication. The authentication is already done by the preceeding AuthenticationRequest-Action.
+ // this action does not need any authentication. The authentication is already done by the preceding AuthenticationRequest-Action.
return false;
}