From fb85746274a04f77ac3a76b1a790fbe210148ee6 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 16 Apr 2014 15:51:02 +0200 Subject: parse additional AuthRequest attributs --- .../moa/id/protocols/pvp2x/PVP2XProtocol.java | 27 ++++++---------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'id') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java index 46cf7dfec..e7b64be6a 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java @@ -332,11 +332,8 @@ public class PVP2XProtocol implements IModulInfo, MOAIDAuthConstants { attributeConsumer = spSSODescriptor.getAttributeConsumingServices().get(attributeIdx); } - - PVPTargetConfiguration config = new PVPTargetConfiguration(); - - + String oaURL = moaRequest.getEntityMetadata().getEntityID(); String binding = consumerService.getBinding(); @@ -349,6 +346,11 @@ public class PVP2XProtocol implements IModulInfo, MOAIDAuthConstants { config.setRequest(moaRequest); config.setConsumerURL(consumerService.getLocation()); + //parse AuthRequest + AuthnRequestImpl authReq = (AuthnRequestImpl) samlReq; + config.setPassiv(authReq.isPassive()); + config.setForce(authReq.isForceAuthn()); + String useMandate = request.getParameter(PARAM_USEMANDATE); if(useMandate != null) { if(useMandate.equals("true") && attributeConsumer != null) { @@ -357,22 +359,7 @@ public class PVP2XProtocol implements IModulInfo, MOAIDAuthConstants { } } } - - //validate AuthnRequest - try { - AuthnRequestValidator.validate((AuthnRequestImpl) samlReq); - - } catch (AuthnRequestValidatorException e) { - if (generateErrorMessage(e, request, response, config)) { - throw new AuthnRequestValidatorException(e.getMessage(), - new Object[] {}, config); - - } else { - throw new MOAIDException(e.getMessage(), new Object[] {}); - - } - } - + return config; } } -- cgit v1.2.3