catch SecurityPolicyException in saml2 authnreq handler
authordmorr <dmorr@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 30 May 2007 12:44:17 +0000 (12:44 +0000)
committerdmorr <dmorr@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Wed, 30 May 2007 12:44:17 +0000 (12:44 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2220 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/profile/saml2/AuthenticationRequestBrowserPost.java

index 29eb74f..cf066bb 100644 (file)
@@ -39,6 +39,7 @@ import org.opensaml.saml2.core.Response;
 import org.opensaml.saml2.metadata.SPSSODescriptor;
 import org.opensaml.saml2.metadata.provider.MetadataProvider;
 import org.opensaml.saml2.metadata.provider.MetadataProviderException;
+import org.opensaml.ws.security.SecurityPolicyException;
 
 /**
  * Browser POST binding for SAML 2 AuthenticationRequest.
@@ -144,8 +145,10 @@ public class AuthenticationRequestBrowserPost extends AbstractAuthenticationRequ
                 log.error("SAML 2 Authentication Request: Unable to decode SAML 2 Authentication Request", ex);
                 throw new ProfileException(
                         "SAML 2 Authentication Request: Unable to decode SAML 2 Authentication Request", ex);
+            } catch (SecurityPolicyException ex) {
+               log.error("SAML 2 Authentication Request: Security error while decoding SAML 2 Authentication Request", ex);
             } catch (AuthenticationRequestException ex) {
-                
+            
                 // AuthN failed. Send the failure status.
                 retrieveRequestData(httpSession, authnRequest, issuer, relyingParty, ssoConfig, spDescriptor);
                 Response failureResponse = buildResponse(authnRequest.getID(), new DateTime(), issuer, ex.getStatus());