aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-05-28 10:13:07 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-05-28 10:13:07 +0200
commit272ed582f22be749945e86eaca5592cc66e153d9 (patch)
tree9aaa65aed2b147f5aa3ebddd8ee959ae51bb9848
parent352a061434c121bb438b01829131aaa85378fc26 (diff)
downloadmoa-id-spss-272ed582f22be749945e86eaca5592cc66e153d9.tar.gz
moa-id-spss-272ed582f22be749945e86eaca5592cc66e153d9.tar.bz2
moa-id-spss-272ed582f22be749945e86eaca5592cc66e153d9.zip
bugfix interfederation configuration
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/InterfederationIDPAction.java16
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/requestHandler/AuthnRequestHandler.java2
2 files changed, 9 insertions, 9 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/InterfederationIDPAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/InterfederationIDPAction.java
index 46c3ea8f5..dfb27673a 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/InterfederationIDPAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/InterfederationIDPAction.java
@@ -225,14 +225,16 @@ public class InterfederationIDPAction extends BasicOAAction {
errors.addAll(form.validate(getGeneralOA(), authUser, request));
- boolean publicServiceAllowed = ValidationHelper.isPublicServiceAllowed(getPvp2OA().getMetaDataURL());
- if (!publicServiceAllowed && !getGeneralOA().isBusinessService()) {
- log.info("Metadata URL " + getPvp2OA().getMetaDataURL() + " does not allow PublicService.");
- errors.add(LanguageHelper.getErrorString("validation.interfederation.moaidp.metadataurl.publicservice",
- new Object[] {getPvp2OA().getMetaDataURL()}, request ));
- getGeneralOA().setBusinessService(true);
+ if (getPvp2OA() != null) {
+ boolean publicServiceAllowed = ValidationHelper.isPublicServiceAllowed(getPvp2OA().getMetaDataURL());
+ if (!publicServiceAllowed && !getGeneralOA().isBusinessService()) {
+ log.info("Metadata URL " + getPvp2OA().getMetaDataURL() + " does not allow PublicService.");
+ errors.add(LanguageHelper.getErrorString("validation.interfederation.moaidp.metadataurl.publicservice",
+ new Object[] {getPvp2OA().getMetaDataURL()}, request ));
+ getGeneralOA().setBusinessService(true);
- }
+ }
+ }
if (errors.size() > 0) {
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/requestHandler/AuthnRequestHandler.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/requestHandler/AuthnRequestHandler.java
index d33c38f25..a31258784 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/requestHandler/AuthnRequestHandler.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/requestHandler/AuthnRequestHandler.java
@@ -32,7 +32,6 @@ import org.opensaml.saml2.core.AuthnRequest;
import org.opensaml.saml2.core.Response;
import org.opensaml.saml2.metadata.AssertionConsumerService;
import org.opensaml.saml2.metadata.EntityDescriptor;
-import org.opensaml.saml2.metadata.SPSSODescriptor;
import org.opensaml.ws.message.encoder.MessageEncodingException;
import org.opensaml.xml.security.SecurityException;
@@ -51,7 +50,6 @@ import at.gv.egovernment.moa.id.protocols.pvp2x.binding.RedirectBinding;
import at.gv.egovernment.moa.id.protocols.pvp2x.builder.AuthResponseBuilder;
import at.gv.egovernment.moa.id.protocols.pvp2x.builder.assertion.PVP2AssertionBuilder;
import at.gv.egovernment.moa.id.protocols.pvp2x.exceptions.BindingNotSupportedException;
-import at.gv.egovernment.moa.id.protocols.pvp2x.exceptions.InvalidAssertionConsumerServiceException;
import at.gv.egovernment.moa.id.protocols.pvp2x.utils.SAML2Utils;
import at.gv.egovernment.moa.logging.Logger;