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/STORKProtocol.java30
1 files changed, 3 insertions, 27 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKProtocol.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKProtocol.java
index a361d5f67..496d1044b 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKProtocol.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKProtocol.java
@@ -9,12 +9,6 @@ import at.gv.egovernment.moa.logging.Logger;
import eu.stork.peps.auth.commons.*;
import eu.stork.peps.auth.engine.STORKSAMLEngine;
import eu.stork.peps.exceptions.STORKSAMLEngineException;
-import org.opensaml.common.binding.BasicSAMLMessageContext;
-import org.opensaml.ws.transport.http.HTTPInTransport;
-import org.opensaml.ws.transport.http.HTTPOutTransport;
-import org.opensaml.ws.transport.http.HttpServletRequestAdapter;
-import org.opensaml.ws.transport.http.HttpServletResponseAdapter;
-
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
@@ -36,16 +30,10 @@ public class STORKProtocol implements IModulInfo, MOAIDAuthConstants {
private static HashMap<String, IAction> actions = new HashMap<String, IAction>();
static {
-
actions.put(AUTHENTICATIONREQUEST, new AuthenticationRequest());
actions.put(ATTRIBUTE_COLLECTOR, new AttributeCollector());
-
- instance = new STORKProtocol();
}
- private static STORKProtocol instance = null;
-
-
public String getName() {
return NAME;
}
@@ -77,12 +65,6 @@ public class STORKProtocol implements IModulInfo, MOAIDAuthConstants {
if (AttributeCollector.class.getSimpleName().equals(action))
return STORK2Request;
- HTTPInTransport profileReq = new HttpServletRequestAdapter(request);
- HTTPOutTransport profileResp = new HttpServletResponseAdapter(response, request.isSecure());
-
- BasicSAMLMessageContext samlMessageContext = new BasicSAMLMessageContext();
- samlMessageContext.setInboundMessageTransport(profileReq);
-
//extract STORK Response from HTTP Request
byte[] decSamlToken;
try {
@@ -93,22 +75,21 @@ public class STORKProtocol implements IModulInfo, MOAIDAuthConstants {
}
//Get SAMLEngine instance
- STORKSAMLEngine authnEngine = STORKSAMLEngine.getInstance("incoming");
- STORKSAMLEngine attrEngine = STORKSAMLEngine.getInstance("incoming_attr");
+ STORKSAMLEngine engine = STORKSAMLEngine.getInstance("VIDP");
STORKAuthnRequest authnRequest = null;
STORKAttrQueryRequest attrRequest = null;
// check if valid authn request is contained
try {
- authnRequest = authnEngine.validateSTORKAuthnRequest(decSamlToken);
+ authnRequest = engine.validateSTORKAuthnRequest(decSamlToken);
} catch (STORKSAMLEngineException ex) {
Logger.error("Unable to validate Stork AuthenticationRequest: " + ex.getMessage());
} catch(ClassCastException e) {
// we do not have a authnRequest
// check if a valid attr request is container
try {
- attrRequest = attrEngine.validateSTORKAttrQueryRequest(decSamlToken);
+ attrRequest = engine.validateSTORKAttrQueryRequest(decSamlToken);
} catch (STORKSAMLEngineException ex) {
Logger.error("Unable to validate Stork AuthenticationRequest: " + ex.getMessage());
}
@@ -137,11 +118,6 @@ public class STORKProtocol implements IModulInfo, MOAIDAuthConstants {
public boolean validate(HttpServletRequest request, HttpServletResponse response, IRequest pending) {
return false;
}
-
- public void checkPersonalAttributes() {
-
-
- }
}