aboutsummaryrefslogtreecommitdiff
path: root/id
diff options
context:
space:
mode:
Diffstat (limited to 'id')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeCollector.java58
-rw-r--r--id/server/moa-id-commons/moa-id-commons.iml1
2 files changed, 2 insertions, 57 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 72dddee88..0317322ee 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
@@ -15,25 +15,6 @@ import at.gv.egovernment.moa.id.moduls.IAction;
import at.gv.egovernment.moa.id.moduls.IRequest;
import at.gv.egovernment.moa.id.storage.AssertionStorage;
import at.gv.egovernment.moa.logging.Logger;
-<<<<<<< HEAD
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.velocity.Template;
-import org.apache.velocity.VelocityContext;
-import org.apache.velocity.app.VelocityEngine;
-import org.opensaml.common.impl.SecureRandomIdentifierGenerator;
-
-import eu.stork.peps.auth.commons.IPersonalAttributeList;
-import eu.stork.peps.auth.commons.PEPSUtil;
-import eu.stork.peps.auth.commons.PersonalAttribute;
-import eu.stork.peps.auth.commons.PersonalAttributeList;
-import eu.stork.peps.auth.commons.STORKAuthnRequest;
-import eu.stork.peps.auth.commons.STORKAuthnResponse;
-import eu.stork.peps.auth.engine.STORKSAMLEngine;
-import eu.stork.peps.exceptions.STORKSAMLEngineException;
-=======
import eu.stork.peps.auth.commons.IPersonalAttributeList;
import eu.stork.peps.auth.commons.PEPSUtil;
import eu.stork.peps.auth.commons.PersonalAttribute;
@@ -47,7 +28,6 @@ import org.opensaml.common.impl.SecureRandomIdentifierGenerator;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
->>>>>>> origin/bs_3_fr
/**
* the AttributeCollector Action tries to get all requested attributes from a set of {@link AttributeProvider} Plugins.
@@ -56,7 +36,6 @@ import javax.servlet.http.HttpServletResponse;
* interaction, redirect to another portal, etc. The redirect will hit here and the class can continue to fetch attributes.
*
* TODO how do we treat mandatory and optional attributes?
- *
*/
public class AttributeCollector implements IAction {
@@ -70,8 +49,6 @@ public class AttributeCollector implements IAction {
*/
public String processRequest(IRequest req, HttpServletRequest httpReq, HttpServletResponse httpResp, AuthenticationSession moasession) throws MOAIDException {
-<<<<<<< HEAD
-=======
// - fetch the container
String artifactId = (String) httpReq.getParameter(ARTIFACT_ID);
DataContainer container;
@@ -82,7 +59,6 @@ public class AttributeCollector implements IAction {
throw new MOAIDException("stork.11", null);
}
->>>>>>> origin/bs_3_fr
// read configuration parameters of OA
OAAuthParameter oaParam = AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(container.getRequest().getAssertionConsumerServiceURL());
if (oaParam == null)
@@ -107,33 +83,20 @@ public class AttributeCollector implements IAction {
Logger.error("No attribute could be retrieved from the response the attribute provider gave us.");
}
-<<<<<<< HEAD
- // - fetch the container
- 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);
- }
-
-=======
->>>>>>> origin/bs_3_fr
// - insert the embedded attribute(s) into the container
addOrUpdateAll(container.getResponse().getPersonalAttributeList(), newAttributes);
// see if we need some more attributes
return processRequest(container, httpReq, httpResp, moasession, oaParam);
}
-
+
/**
* Checks if there are missing attributes and tries to fetch them. If there are no more attribute to fetch,
* this very method creates and sends the protocol result to the asking S-PEPS.
*
* @param container the {@link DataContainer} representing the status of the overall query.
* @return the string
- * @throws MOAIDException
+ * @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
@@ -199,11 +162,7 @@ public class AttributeCollector implements IAction {
AssertionStorage.getInstance().put(newArtifactId, container);
// add container-key to redirect embedded within the return URL
-<<<<<<< HEAD
- e.getAp().performRedirect(AuthConfigurationProvider.getInstance().getPublicURLPrefix() + "/dispatcher?mod=id_stork2&action=AttributeCollector&" + ARTIFACT_ID + "=" + newArtifactId, container.getRequest().getSpCountry(), request, response, oaParam);
-=======
e.getAp().performRedirect(AuthConfigurationProvider.getInstance().getPublicURLPrefix() + "/stork2/ResumeAuthentication?" + ARTIFACT_ID + "=" + newArtifactId, container.getRequest().getSpCountry(), request, response, oaParam);
->>>>>>> origin/bs_3_fr
} catch (Exception e1) {
// TODO should we return the response as is to the PEPS?
@@ -222,13 +181,8 @@ public class AttributeCollector implements IAction {
* @throws MOAIDException the mOAID exception
*/
private void generateSTORKResponse(DataContainer container) throws MOAIDException {
-<<<<<<< HEAD
- STORKAuthnResponse authnResponse = container.getResponse();
- STORKAuthnRequest authnRequest = container.getRequest();
-=======
MOASTORKRequest request = container.getRequest();
MOASTORKResponse response = container.getResponse();
->>>>>>> origin/bs_3_fr
try {
//Get SAMLEngine instance
@@ -247,14 +201,6 @@ public class AttributeCollector implements IAction {
}
Logger.info("STORK SAML Response message succesfully generated ");
-<<<<<<< HEAD
- Logger.debug("authn saml plain:" + authnResponse.getTokenSaml());
- Logger.debug("authn saml string:" + new String(authnResponse.getTokenSaml()));
- Logger.debug("authn saml encodedx: " + PEPSUtil.encodeSAMLToken(authnResponse.getTokenSaml()));
-
- container.setResponse(authnResponse);
-=======
->>>>>>> origin/bs_3_fr
}
/**
diff --git a/id/server/moa-id-commons/moa-id-commons.iml b/id/server/moa-id-commons/moa-id-commons.iml
index 3bd426fc3..ef994abd3 100644
--- a/id/server/moa-id-commons/moa-id-commons.iml
+++ b/id/server/moa-id-commons/moa-id-commons.iml
@@ -37,7 +37,6 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="moa-common" />
<orderEntry type="library" name="Maven: org.hibernate:hibernate-core:4.2.1.Final" level="project" />
<orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.1.0.GA" level="project" />