aboutsummaryrefslogtreecommitdiff
path: root/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2016-02-22 11:34:32 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2016-02-22 11:34:32 +0100
commitb1235f66ee1e890f9868724f9faedd222541178b (patch)
tree66863e56f36139c008c72c3e8678e5ba26d24d15 /id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv
parentca8b83874c03a8719a56816408c8df44d49640f1 (diff)
downloadmoa-id-spss-b1235f66ee1e890f9868724f9faedd222541178b.tar.gz
moa-id-spss-b1235f66ee1e890f9868724f9faedd222541178b.tar.bz2
moa-id-spss-b1235f66ee1e890f9868724f9faedd222541178b.zip
refactor PVP implementation to share code with PVP Service-Provider moduls
Diffstat (limited to 'id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv')
-rw-r--r--id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASData.java17
-rw-r--r--id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java6
2 files changed, 9 insertions, 14 deletions
diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASData.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASData.java
index 374c3df30..5c25c49c5 100644
--- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASData.java
+++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASData.java
@@ -2,26 +2,19 @@ package at.gv.egovernment.moa.id.protocols.eidas;
import java.util.List;
-import javax.servlet.http.HttpServletRequest;
-
import org.opensaml.saml2.core.Attribute;
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
import at.gv.egovernment.moa.id.auth.modules.eidas.utils.MOAPersonalAttributeList;
-import at.gv.egovernment.moa.id.config.ConfigurationException;
import at.gv.egovernment.moa.id.moduls.RequestImpl;
import eu.eidas.auth.commons.EIDASAuthnRequest;
+@Component("EIDASData")
+@Scope(value = BeanDefinition.SCOPE_PROTOTYPE)
public class EIDASData extends RequestImpl {
- /**
- * @param req
- * @throws ConfigurationException
- */
- public EIDASData(HttpServletRequest req) throws ConfigurationException {
- super(req);
-
- }
-
/** The Constant serialVersionUID. */
private static final long serialVersionUID = 8765755670214923910L;
diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java
index cf3960815..4caa6700a 100644
--- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java
+++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java
@@ -69,7 +69,8 @@ public class EIDASProtocol extends AbstractAuthProtocolModulController {
public void eIDASMetadataRequest(HttpServletRequest req, HttpServletResponse resp) throws MOAIDException {
//create pendingRequest object
- EIDASData pendingReq = new EIDASData(req);
+ EIDASData pendingReq = applicationContext.getBean(EIDASData.class);
+ pendingReq.initialize(req);
pendingReq.setModule(NAME);
pendingReq.setNeedAuthentication(false);
pendingReq.setAuthenticated(false);
@@ -97,7 +98,8 @@ public class EIDASProtocol extends AbstractAuthProtocolModulController {
public void PVPIDPPostRequest(HttpServletRequest req, HttpServletResponse resp) throws MOAIDException, IOException {
//create pending-request object
- EIDASData pendingReq = new EIDASData(req);
+ EIDASData pendingReq = applicationContext.getBean(EIDASData.class);
+ pendingReq.initialize(req);
pendingReq.setModule(NAME);
revisionsLogger.logEvent(MOAIDEventConstants.SESSION_CREATED, pendingReq.getUniqueSessionIdentifier());