aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java
diff options
context:
space:
mode:
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/STORKProtocol.java25
1 files changed, 6 insertions, 19 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 28a516d2a..3b9a5bc29 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
@@ -8,6 +8,7 @@ import at.gv.egovernment.moa.id.moduls.IRequest;
import at.gv.egovernment.moa.logging.Logger;
import eu.stork.peps.auth.commons.PEPSUtil;
import eu.stork.peps.auth.commons.STORKAttrQueryRequest;
+import eu.stork.peps.auth.commons.STORKAuthnRequest;
import eu.stork.peps.auth.engine.STORKSAMLEngine;
import eu.stork.peps.exceptions.STORKSAMLEngineException;
import org.opensaml.common.binding.BasicSAMLMessageContext;
@@ -15,7 +16,6 @@ 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 eu.stork.peps.auth.commons.STORKAuthnRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -23,6 +23,7 @@ import java.util.HashMap;
/**
* Stork 2 Protocol Support
+ *
* @author bsuzic
*/
public class STORKProtocol implements IModulInfo, MOAIDAuthConstants {
@@ -31,7 +32,7 @@ public class STORKProtocol implements IModulInfo, MOAIDAuthConstants {
public static final String PATH = "id_stork2";
public static final String AUTHENTICATIONREQUEST = "AuthenticationRequest";
- public static final String ATTRIBUTE_COLLECTOR = "AttributeCollector";
+ public static final String ATTRIBUTE_COLLECTOR = "AttributeCollector";
private static HashMap<String, IAction> actions = new HashMap<String, IAction>();
@@ -79,18 +80,6 @@ public class STORKProtocol implements IModulInfo, MOAIDAuthConstants {
BasicSAMLMessageContext samlMessageContext = new BasicSAMLMessageContext();
samlMessageContext.setInboundMessageTransport(profileReq);
-/*
- HTTPPostDecoder postDecoder = new HTTPPostDecoder();
- postDecoder.setURIComparator(new MOAURICompare()); // TODO Abstract to use general comparator
-
- try {
- Logger.debug("Attempting to decode request...");
- postDecoder.decode(samlMessageContext);
- } catch (Exception e) {
- Logger.error("Error decoding STORKAuthnRequest", e);
- }
-*/
-
MOASTORKRequest STORK2Request = new MOASTORKRequest();
@@ -98,7 +87,7 @@ public class STORKProtocol implements IModulInfo, MOAIDAuthConstants {
byte[] decSamlToken;
try {
decSamlToken = PEPSUtil.decodeSAMLToken(request.getParameter("SAMLRequest"));
- } catch(NullPointerException e) {
+ } catch (NullPointerException e) {
Logger.error("Unable to retrieve STORK Request", e);
throw new MOAIDException("stork.04", null);
}
@@ -113,7 +102,7 @@ public class STORKProtocol implements IModulInfo, MOAIDAuthConstants {
try {
authnRequest = engine.validateSTORKAuthnRequest(decSamlToken);
} catch (STORKSAMLEngineException ex) {
- Logger.error("Unable to validate Stork AuthenticationRequest: " + ex.getMessage() );
+ Logger.error("Unable to validate Stork AuthenticationRequest: " + ex.getMessage());
}
@@ -121,12 +110,10 @@ public class STORKProtocol implements IModulInfo, MOAIDAuthConstants {
try {
attrRequest = engine.validateSTORKAttrQueryRequest(decSamlToken);
} catch (STORKSAMLEngineException ex) {
- Logger.error("Unable to validate Stork AuthenticationRequest: " + ex.getMessage() );
+ Logger.error("Unable to validate Stork AuthenticationRequest: " + ex.getMessage());
}
-
-
Logger.error("acsu " + authnRequest.getAssertionConsumerServiceURL());
Logger.error("cc " + authnRequest.getCitizenCountryCode());
Logger.error("iss " + authnRequest.getIssuer());