Finish synch up with OpenSAML stack message context API changes
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 14 Aug 2007 01:56:15 +0000 (01:56 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 14 Aug 2007 01:56:15 +0000 (01:56 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2331 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/profile/saml1/AbstractSAML1ProfileHandler.java
src/edu/internet2/middleware/shibboleth/idp/profile/saml1/AttributeQueryProfileHandler.java
src/edu/internet2/middleware/shibboleth/idp/profile/saml1/ShibbolethSSOProfileHandler.java
src/edu/internet2/middleware/shibboleth/idp/profile/saml2/AbstractSAML2ProfileHandler.java
src/edu/internet2/middleware/shibboleth/idp/profile/saml2/AttributeQueryProfileHandler.java
src/edu/internet2/middleware/shibboleth/idp/profile/saml2/SSOProfileHandler.java
test/edu/internet2/middleware/shibboleth/idp/system/conf1/SAML2AttributeQueryTestCase.java
test/edu/internet2/middleware/shibboleth/idp/system/conf1/SAML2SSOTestCase.java

index 090b602..a4cb469 100644 (file)
@@ -365,11 +365,11 @@ public abstract class AbstractSAML1ProfileHandler extends AbstractSAMLProfileHan
             throws ProfileException {
         ArrayList<String> nameFormats = new ArrayList<String>();
 
-        RoleDescriptor assertingPartyRole = requestContext.getAssertingPartyRoleMetadata();
+        RoleDescriptor assertingPartyRole = requestContext.getLocalEntityRoleMetadata();
         List<String> assertingPartySupportedFormats = getEntitySupportedFormats(assertingPartyRole);
 
         if (nameFormats.isEmpty()) {
-            RoleDescriptor relyingPartyRole = requestContext.getRelyingPartyRoleMetadata();
+            RoleDescriptor relyingPartyRole = requestContext.getPeerEntityRoleMetadata();
             List<String> relyingPartySupportedFormats = getEntitySupportedFormats(relyingPartyRole);
 
             assertingPartySupportedFormats.retainAll(relyingPartySupportedFormats);
@@ -495,7 +495,7 @@ public abstract class AbstractSAML1ProfileHandler extends AbstractSAMLProfileHan
             }
             Map<String, BaseAttribute> principalAttributes = attributeAuthority.getAttributes(requestContext);
 
-            requestContext.setPrincipalAttributes(principalAttributes);
+            requestContext.setAttributes(principalAttributes);
         } catch (AttributeRequestException e) {
             log.error("Error resolving attributes for SAML request from relying party "
                     + requestContext.getRelyingPartyEntityId(), e);
@@ -596,7 +596,7 @@ public abstract class AbstractSAML1ProfileHandler extends AbstractSAMLProfileHan
 
         boolean signAssertion = false;
 
-        RoleDescriptor relyingPartyRole = requestContext.getRelyingPartyRoleMetadata();
+        RoleDescriptor relyingPartyRole = requestContext.getPeerEntityRoleMetadata();
         AbstractSAML1ProfileConfiguration profileConfig = requestContext.getProfileConfiguration();
 
         if (relyingPartyRole instanceof SPSSODescriptor) {
@@ -661,8 +661,8 @@ public abstract class AbstractSAML1ProfileHandler extends AbstractSAMLProfileHan
         auditLogEntry.setRequestId(null);
         auditLogEntry.setResponseBinding(getMessageEncoder().getBindingURI());
         auditLogEntry.setResponseId(context.getOutboundSAMLMessageId());
-        if (context.getReleasedPrincipalAttributeIds() != null) {
-            auditLogEntry.getReleasedAttributes().addAll(context.getReleasedPrincipalAttributeIds());
+        if (context.getReleasedAttributes() != null) {
+            auditLogEntry.getReleasedAttributes().addAll(context.getReleasedAttributes());
         }
         getAduitLog().log(Level.CRITICAL, auditLogEntry);
     }
index f6df2b6..dd314d6 100644 (file)
@@ -133,18 +133,18 @@ public class AttributeQueryProfileHandler extends AbstractSAML1ProfileHandler {
                 requestContext.setInboundSAMLMessageIssueInstant(attributeRequest.getIssueInstant());
 
                 String relyingPartyId = requestContext.getRelyingPartyEntityId();
-                requestContext.setRelyingPartyMetadata(metadataProvider.getEntityDescriptor(relyingPartyId));
-                requestContext.setRelyingPartyRole(SPSSODescriptor.DEFAULT_ELEMENT_NAME);
-                requestContext.setRelyingPartyRoleMetadata(requestContext.getRelyingPartyMetadata().getSPSSODescriptor(
+                requestContext.setPeerEntityMetadata(metadataProvider.getEntityDescriptor(relyingPartyId));
+                requestContext.setPeerEntityRole(SPSSODescriptor.DEFAULT_ELEMENT_NAME);
+                requestContext.setPeerEntityRoleMetadata(requestContext.getPeerEntityMetadata().getSPSSODescriptor(
                         SAMLConstants.SAML10P_NS));
                 RelyingPartyConfiguration rpConfig = getRelyingPartyConfiguration(relyingPartyId);
                 requestContext.setRelyingPartyConfiguration(rpConfig);
 
                 String assertingPartyId = requestContext.getRelyingPartyConfiguration().getProviderId();
                 requestContext.setAssertingPartyEntityId(assertingPartyId);
-                requestContext.setAssertingPartyMetadata(metadataProvider.getEntityDescriptor(assertingPartyId));
-                requestContext.setAssertingPartyRole(AttributeAuthorityDescriptor.DEFAULT_ELEMENT_NAME);
-                requestContext.setAssertingPartyRoleMetadata(requestContext.getAssertingPartyMetadata()
+                requestContext.setLocalEntityMetadata(metadataProvider.getEntityDescriptor(assertingPartyId));
+                requestContext.setLocalEntityRole(AttributeAuthorityDescriptor.DEFAULT_ELEMENT_NAME);
+                requestContext.setLocalEntityRoleMetadata(requestContext.getLocalEntityMetadata()
                         .getAttributeAuthorityDescriptor(SAMLConstants.SAML10P_NS));
 
                 AttributeQueryConfiguration profileConfig = (AttributeQueryConfiguration) rpConfig
index a07780f..4208f40 100644 (file)
@@ -301,20 +301,20 @@ public class ShibbolethSSOProfileHandler extends AbstractSAML1ProfileHandler {
             String relyingPartyId = loginContext.getRelyingPartyId();
             requestContext.setRelyingPartyEntityId(relyingPartyId);
             EntityDescriptor relyingPartyMetadata = metadataProvider.getEntityDescriptor(relyingPartyId);
-            requestContext.setRelyingPartyMetadata(relyingPartyMetadata);
-            requestContext.setRelyingPartyRole(SPSSODescriptor.DEFAULT_ELEMENT_NAME);
-            requestContext.setRelyingPartyRoleMetadata(relyingPartyMetadata
+            requestContext.setPeerEntityMetadata(relyingPartyMetadata);
+            requestContext.setPeerEntityRole(SPSSODescriptor.DEFAULT_ELEMENT_NAME);
+            requestContext.setPeerEntityRoleMetadata(relyingPartyMetadata
                     .getSPSSODescriptor(SAMLConstants.SAML11P_NS));
             RelyingPartyConfiguration rpConfig = getRelyingPartyConfiguration(relyingPartyId);
             requestContext.setRelyingPartyConfiguration(rpConfig);
-            requestContext.setRelyingPartyEndpoint(selectEndpoint(requestContext));
+            requestContext.setPeerEntityEndpoint(selectEndpoint(requestContext));
 
             String assertingPartyId = rpConfig.getProviderId();
             requestContext.setAssertingPartyEntityId(assertingPartyId);
             EntityDescriptor assertingPartyMetadata = metadataProvider.getEntityDescriptor(assertingPartyId);
-            requestContext.setAssertingPartyMetadata(assertingPartyMetadata);
-            requestContext.setAssertingPartyRole(IDPSSODescriptor.DEFAULT_ELEMENT_NAME);
-            requestContext.setAssertingPartyRoleMetadata(assertingPartyMetadata
+            requestContext.setLocalEntityMetadata(assertingPartyMetadata);
+            requestContext.setLocalEntityRole(IDPSSODescriptor.DEFAULT_ELEMENT_NAME);
+            requestContext.setLocalEntityRoleMetadata(assertingPartyMetadata
                     .getIDPSSODescriptor(SAMLConstants.SAML20P_NS));
 
             requestContext.setMessageOutTransport(out);
@@ -358,8 +358,8 @@ public class ShibbolethSSOProfileHandler extends AbstractSAML1ProfileHandler {
         BasicEndpointSelector endpointSelector = new BasicEndpointSelector();
         endpointSelector.setEndpointType(AssertionConsumerService.DEFAULT_ELEMENT_NAME);
         endpointSelector.setMetadataProvider(getMetadataProvider());
-        endpointSelector.setRelyingParty(requestContext.getRelyingPartyMetadata());
-        endpointSelector.setRelyingPartyRole(requestContext.getRelyingPartyRoleMetadata());
+        endpointSelector.setRelyingParty(requestContext.getPeerEntityMetadata());
+        endpointSelector.setRelyingPartyRole(requestContext.getPeerEntityRoleMetadata());
         endpointSelector.setSamlRequest(requestContext.getInboundSAMLMessage());
         endpointSelector.getSupportedIssuerBindings().addAll(supportedOutgoingBindings);
         return endpointSelector.selectEndpoint();
index 36383a3..344f8c3 100644 (file)
@@ -332,7 +332,7 @@ public abstract class AbstractSAML2ProfileHandler extends AbstractSAMLProfileHan
             }
             Map<String, BaseAttribute> principalAttributes = attributeAuthority.getAttributes(requestContext);
 
-            requestContext.setPrincipalAttributes(principalAttributes);
+            requestContext.setAttributes(principalAttributes);
         } catch (AttributeRequestException e) {
             log.error("Error resolving attributes for SAML request " + requestContext.getInboundSAMLMessageId()
                     + " from relying party " + requestContext.getRelyingPartyEntityId(), e);
@@ -438,8 +438,8 @@ public abstract class AbstractSAML2ProfileHandler extends AbstractSAMLProfileHan
 
         AbstractSAML2ProfileConfiguration profileConfig = requestContext.getProfileConfiguration();
 
-        if (requestContext.getRelyingPartyRoleMetadata() instanceof SPSSODescriptor) {
-            SPSSODescriptor ssoDescriptor = (SPSSODescriptor) requestContext.getRelyingPartyRoleMetadata();
+        if (requestContext.getPeerEntityRoleMetadata() instanceof SPSSODescriptor) {
+            SPSSODescriptor ssoDescriptor = (SPSSODescriptor) requestContext.getPeerEntityRoleMetadata();
             if (ssoDescriptor.getWantAssertionsSigned() != null) {
                 signAssertion = ssoDescriptor.getWantAssertionsSigned().booleanValue();
                 if (log.isDebugEnabled()) {
@@ -541,7 +541,7 @@ public abstract class AbstractSAML2ProfileHandler extends AbstractSAMLProfileHan
         confirmationData.setNotOnOrAfter(issueInstant.plus(requestContext.getProfileConfiguration()
                 .getAssertionLifetime()));
 
-        Endpoint relyingPartyEndpoint = requestContext.getRelyingPartyEndpoint();
+        Endpoint relyingPartyEndpoint = requestContext.getPeerEntityEndpoint();
         if (relyingPartyEndpoint != null) {
             if (relyingPartyEndpoint.getResponseLocation() != null) {
                 confirmationData.setRecipient(relyingPartyEndpoint.getResponseLocation());
@@ -636,7 +636,7 @@ public abstract class AbstractSAML2ProfileHandler extends AbstractSAMLProfileHan
         ArrayList<String> nameFormats = new ArrayList<String>();
 
         List<String> assertingPartySupportedFormats = getEntitySupportedFormats(requestContext
-                .getAssertingPartyRoleMetadata());
+                .getLocalEntityRoleMetadata());
 
         String nameFormat = null;
         if (requestContext.getInboundSAMLMessage() instanceof AuthnRequest) {
@@ -655,7 +655,7 @@ public abstract class AbstractSAML2ProfileHandler extends AbstractSAMLProfileHan
 
         if (nameFormats.isEmpty()) {
             List<String> relyingPartySupportedFormats = getEntitySupportedFormats(requestContext
-                    .getRelyingPartyRoleMetadata());
+                    .getPeerEntityRoleMetadata());
 
             assertingPartySupportedFormats.retainAll(relyingPartySupportedFormats);
             nameFormats.addAll(assertingPartySupportedFormats);
@@ -730,8 +730,8 @@ public abstract class AbstractSAML2ProfileHandler extends AbstractSAMLProfileHan
         auditLogEntry.setRequestId(context.getInboundSAMLMessageId());
         auditLogEntry.setResponseBinding(getMessageEncoder().getBindingURI());
         auditLogEntry.setResponseId(context.getOutboundSAMLMessageId());
-        if (context.getReleasedPrincipalAttributeIds() != null) {
-            auditLogEntry.getReleasedAttributes().addAll(context.getReleasedPrincipalAttributeIds());
+        if (context.getReleasedAttributes() != null) {
+            auditLogEntry.getReleasedAttributes().addAll(context.getReleasedAttributes());
         }
         getAduitLog().log(Level.CRITICAL, auditLogEntry);
     }
index 52d3cd9..08455ee 100644 (file)
@@ -138,18 +138,18 @@ public class AttributeQueryProfileHandler extends AbstractSAML2ProfileHandler {
                 requestContext.setInboundSAMLMessageIssueInstant(attributeQuery.getIssueInstant());
 
                 String relyingPartyId = requestContext.getRelyingPartyEntityId();
-                requestContext.setRelyingPartyMetadata(metadataProvider.getEntityDescriptor(relyingPartyId));
-                requestContext.setRelyingPartyRole(SPSSODescriptor.DEFAULT_ELEMENT_NAME);
-                requestContext.setRelyingPartyRoleMetadata(requestContext.getRelyingPartyMetadata().getSPSSODescriptor(
+                requestContext.setPeerEntityMetadata(metadataProvider.getEntityDescriptor(relyingPartyId));
+                requestContext.setPeerEntityRole(SPSSODescriptor.DEFAULT_ELEMENT_NAME);
+                requestContext.setPeerEntityRoleMetadata(requestContext.getPeerEntityMetadata().getSPSSODescriptor(
                         SAMLConstants.SAML20P_NS));
                 RelyingPartyConfiguration rpConfig = getRelyingPartyConfiguration(relyingPartyId);
                 requestContext.setRelyingPartyConfiguration(rpConfig);
 
                 String assertingPartyId = requestContext.getRelyingPartyConfiguration().getProviderId();
                 requestContext.setAssertingPartyEntityId(assertingPartyId);
-                requestContext.setAssertingPartyMetadata(metadataProvider.getEntityDescriptor(assertingPartyId));
-                requestContext.setAssertingPartyRole(AttributeAuthorityDescriptor.DEFAULT_ELEMENT_NAME);
-                requestContext.setAssertingPartyRoleMetadata(requestContext.getAssertingPartyMetadata()
+                requestContext.setLocalEntityMetadata(metadataProvider.getEntityDescriptor(assertingPartyId));
+                requestContext.setLocalEntityRole(AttributeAuthorityDescriptor.DEFAULT_ELEMENT_NAME);
+                requestContext.setLocalEntityRoleMetadata(requestContext.getLocalEntityMetadata()
                         .getAttributeAuthorityDescriptor(SAMLConstants.SAML20P_NS));
 
                 AttributeQueryConfiguration profileConfig = (AttributeQueryConfiguration) rpConfig
index 64891b2..734063a 100644 (file)
@@ -310,20 +310,20 @@ public class SSOProfileHandler extends AbstractSAML2ProfileHandler {
             String relyingPartyId = loginContext.getRelyingPartyId();
             requestContext.setRelyingPartyEntityId(relyingPartyId);
             EntityDescriptor relyingPartyMetadata = metadataProvider.getEntityDescriptor(relyingPartyId);
-            requestContext.setRelyingPartyMetadata(relyingPartyMetadata);
-            requestContext.setRelyingPartyRole(SPSSODescriptor.DEFAULT_ELEMENT_NAME);
-            requestContext.setRelyingPartyRoleMetadata(relyingPartyMetadata
+            requestContext.setPeerEntityMetadata(relyingPartyMetadata);
+            requestContext.setPeerEntityRole(SPSSODescriptor.DEFAULT_ELEMENT_NAME);
+            requestContext.setPeerEntityRoleMetadata(relyingPartyMetadata
                     .getSPSSODescriptor(SAMLConstants.SAML20P_NS));
             RelyingPartyConfiguration rpConfig = getRelyingPartyConfiguration(relyingPartyId);
             requestContext.setRelyingPartyConfiguration(rpConfig);
-            requestContext.setRelyingPartyEndpoint(selectEndpoint(requestContext));
+            requestContext.setPeerEntityEndpoint(selectEndpoint(requestContext));
 
             String assertingPartyId = rpConfig.getProviderId();
             requestContext.setAssertingPartyEntityId(assertingPartyId);
             EntityDescriptor assertingPartyMetadata = metadataProvider.getEntityDescriptor(assertingPartyId);
-            requestContext.setAssertingPartyMetadata(assertingPartyMetadata);
-            requestContext.setAssertingPartyRole(IDPSSODescriptor.DEFAULT_ELEMENT_NAME);
-            requestContext.setAssertingPartyRoleMetadata(assertingPartyMetadata
+            requestContext.setLocalEntityMetadata(assertingPartyMetadata);
+            requestContext.setLocalEntityRole(IDPSSODescriptor.DEFAULT_ELEMENT_NAME);
+            requestContext.setLocalEntityRoleMetadata(assertingPartyMetadata
                     .getIDPSSODescriptor(SAMLConstants.SAML20P_NS));
 
             requestContext.setMessageOutTransport(out);
@@ -447,8 +447,8 @@ public class SSOProfileHandler extends AbstractSAML2ProfileHandler {
         AuthnResponseEndpointSelector endpointSelector = new AuthnResponseEndpointSelector();
         endpointSelector.setEndpointType(AssertionConsumerService.DEFAULT_ELEMENT_NAME);
         endpointSelector.setMetadataProvider(getMetadataProvider());
-        endpointSelector.setRelyingParty(requestContext.getRelyingPartyMetadata());
-        endpointSelector.setRelyingPartyRole(requestContext.getRelyingPartyRoleMetadata());
+        endpointSelector.setRelyingParty(requestContext.getPeerEntityMetadata());
+        endpointSelector.setRelyingPartyRole(requestContext.getPeerEntityRoleMetadata());
         endpointSelector.setSamlRequest(requestContext.getInboundSAMLMessage());
         endpointSelector.getSupportedIssuerBindings().addAll(supportedOutgoingBindings);
         return endpointSelector.selectEndpoint();
index 08b296a..5e59708 100644 (file)
@@ -29,6 +29,10 @@ import org.opensaml.saml2.core.Subject;
 import org.opensaml.ws.soap.common.SOAPObjectBuilder;
 import org.opensaml.ws.soap.soap11.Body;
 import org.opensaml.ws.soap.soap11.Envelope;
+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 org.opensaml.xml.io.Marshaller;
 import org.opensaml.xml.io.MarshallingException;
 import org.opensaml.xml.util.XMLHelper;
@@ -38,10 +42,6 @@ import org.w3c.dom.Element;
 
 import edu.internet2.middleware.shibboleth.common.profile.ProfileHandler;
 import edu.internet2.middleware.shibboleth.common.profile.ProfileHandlerManager;
-import edu.internet2.middleware.shibboleth.common.profile.ProfileRequest;
-import edu.internet2.middleware.shibboleth.common.profile.ProfileResponse;
-import edu.internet2.middleware.shibboleth.idp.profile.ShibbolethProfileRequest;
-import edu.internet2.middleware.shibboleth.idp.profile.ShibbolethProfileResponse;
 
 /**
  * A system test that meant to simulate various types of SAML 2 attribute queries.
@@ -65,8 +65,8 @@ public class SAML2AttributeQueryTestCase extends BaseConf1TestCase {
         assertNotNull(handler);
 
         // Process request
-        ProfileRequest profileRequest = new ShibbolethProfileRequest(servletRequest);
-        ProfileResponse profileResponse = new ShibbolethProfileResponse(servletResponse);
+        HTTPInTransport profileRequest = new HttpServletRequestAdapter(servletRequest);
+        HTTPOutTransport profileResponse = new HttpServletResponseAdapter(servletResponse);
         handler.processRequest(profileRequest, profileResponse);
 
         String response = servletResponse.getContentAsString();
@@ -91,8 +91,8 @@ public class SAML2AttributeQueryTestCase extends BaseConf1TestCase {
         assertNotNull(handler);
 
         // Process request
-        ProfileRequest profileRequest = new ShibbolethProfileRequest(servletRequest);
-        ProfileResponse profileResponse = new ShibbolethProfileResponse(servletResponse);
+        HTTPInTransport profileRequest = new HttpServletRequestAdapter(servletRequest);
+        HTTPOutTransport profileResponse = new HttpServletResponseAdapter(servletResponse);
         handler.processRequest(profileRequest, profileResponse);
 
         String response = servletResponse.getContentAsString();
@@ -117,8 +117,8 @@ public class SAML2AttributeQueryTestCase extends BaseConf1TestCase {
         assertNotNull(handler);
 
         // Process request
-        ProfileRequest profileRequest = new ShibbolethProfileRequest(servletRequest);
-        ProfileResponse profileResponse = new ShibbolethProfileResponse(servletResponse);
+        HTTPInTransport profileRequest = new HttpServletRequestAdapter(servletRequest);
+        HTTPOutTransport profileResponse = new HttpServletResponseAdapter(servletResponse);
         handler.processRequest(profileRequest, profileResponse);
 
         String response = servletResponse.getContentAsString();
index bb447fe..771732f 100644 (file)
@@ -20,9 +20,12 @@ import javax.servlet.http.HttpSession;
 
 import org.joda.time.DateTime;
 import org.opensaml.common.SAMLObjectBuilder;
-import org.opensaml.saml2.binding.decoding.HTTPPostDecoder;
 import org.opensaml.saml2.core.AuthnRequest;
 import org.opensaml.saml2.core.Issuer;
+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 org.opensaml.xml.io.Marshaller;
 import org.opensaml.xml.io.MarshallingException;
 import org.opensaml.xml.util.Base64;
@@ -34,12 +37,7 @@ import org.w3c.dom.Element;
 import edu.internet2.middleware.shibboleth.common.profile.ProfileException;
 import edu.internet2.middleware.shibboleth.common.profile.ProfileHandler;
 import edu.internet2.middleware.shibboleth.common.profile.ProfileHandlerManager;
-import edu.internet2.middleware.shibboleth.common.profile.ProfileRequest;
-import edu.internet2.middleware.shibboleth.common.profile.ProfileResponse;
 import edu.internet2.middleware.shibboleth.idp.authn.Saml2LoginContext;
-import edu.internet2.middleware.shibboleth.idp.profile.IdPProfileHandlerManager;
-import edu.internet2.middleware.shibboleth.idp.profile.ShibbolethProfileRequest;
-import edu.internet2.middleware.shibboleth.idp.profile.ShibbolethProfileResponse;
 
 /**
  * 
@@ -53,7 +51,7 @@ public class SAML2SSOTestCase extends BaseConf1TestCase {
 
         MockHttpServletRequest servletRequest = new MockHttpServletRequest();
         servletRequest.setPathInfo("/IdP/saml2/SSONoAuth");
-        servletRequest.setParameter(HTTPPostDecoder.REQUEST_PARAM, Base64.encodeBytes(authnRequestString.getBytes()));
+        servletRequest.setParameter("SAMLRequest", Base64.encodeBytes(authnRequestString.getBytes()));
 
         MockHttpServletResponse servletResponse = new MockHttpServletResponse();
 
@@ -63,8 +61,8 @@ public class SAML2SSOTestCase extends BaseConf1TestCase {
         assertNotNull(handler);
 
         // Process request
-        ProfileRequest profileRequest = new ShibbolethProfileRequest(servletRequest);
-        ProfileResponse profileResponse = new ShibbolethProfileResponse(servletResponse);
+        HTTPInTransport profileRequest = new HttpServletRequestAdapter(servletRequest);
+        HTTPOutTransport profileResponse = new HttpServletResponseAdapter(servletResponse);
 
         try {
             handler.processRequest(profileRequest, profileResponse);
@@ -80,7 +78,7 @@ public class SAML2SSOTestCase extends BaseConf1TestCase {
 
         MockHttpServletRequest servletRequest = new MockHttpServletRequest();
         servletRequest.setPathInfo("/IdP/saml2/SSONoAuth");
-        servletRequest.setParameter(HTTPPostDecoder.REQUEST_PARAM, Base64.encodeBytes(authnRequestString.getBytes()));
+        servletRequest.setParameter("SAMLRequest", Base64.encodeBytes(authnRequestString.getBytes()));
 
         MockHttpServletResponse servletResponse = new MockHttpServletResponse();
 
@@ -90,8 +88,8 @@ public class SAML2SSOTestCase extends BaseConf1TestCase {
         assertNotNull(handler);
 
         // Process request
-        ProfileRequest profileRequest = new ShibbolethProfileRequest(servletRequest);
-        ProfileResponse profileResponse = new ShibbolethProfileResponse(servletResponse);
+        HTTPInTransport profileRequest = new HttpServletRequestAdapter(servletRequest);
+        HTTPOutTransport profileResponse = new HttpServletResponseAdapter(servletResponse);
         handler.processRequest(profileRequest, profileResponse);
 
         HttpSession session = servletRequest.getSession();
@@ -101,16 +99,16 @@ public class SAML2SSOTestCase extends BaseConf1TestCase {
 
     public void testSecondLeg() throws Exception {
         AuthnRequest authnRequest = buildAuthnRequest("urn:example.org:unitTestFed:sp2");
-        
+
         Saml2LoginContext loginContext = new Saml2LoginContext("urn:example.org:unitTestFed:sp2", null, authnRequest);
         loginContext.setAuthenticationInstant(new DateTime());
         loginContext.setAuthenticationMethod("urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified");
         loginContext.setPrincipalAuthenticated(true);
-        loginContext.setPrincipalName("testUser");        
+        loginContext.setPrincipalName("testUser");
 
         MockHttpServletRequest servletRequest = new MockHttpServletRequest();
         servletRequest.setPathInfo("/IdP/saml2/SSONoAuth");
-        
+
         HttpSession session = servletRequest.getSession();
         session.setAttribute(Saml2LoginContext.LOGIN_CONTEXT_KEY, loginContext);
 
@@ -122,8 +120,8 @@ public class SAML2SSOTestCase extends BaseConf1TestCase {
         assertNotNull(handler);
 
         // Process request
-        ProfileRequest profileRequest = new ShibbolethProfileRequest(servletRequest);
-        ProfileResponse profileResponse = new ShibbolethProfileResponse(servletResponse);
+        HTTPInTransport profileRequest = new HttpServletRequestAdapter(servletRequest);
+        HTTPOutTransport profileResponse = new HttpServletResponseAdapter(servletResponse);
         handler.processRequest(profileRequest, profileResponse);
 
         System.out.println(servletResponse.getContentAsString());