Set communication profile before decoding
authorlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 26 Feb 2008 08:19:11 +0000 (08:19 +0000)
committerlajoie <lajoie@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 26 Feb 2008 08:19:11 +0000 (08:19 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2656 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/idp/profile/AbstractSAMLProfileHandler.java
src/edu/internet2/middleware/shibboleth/idp/profile/saml1/ArtifactResolution.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/ArtifactResolution.java
src/edu/internet2/middleware/shibboleth/idp/profile/saml2/AttributeQueryProfileHandler.java
src/edu/internet2/middleware/shibboleth/idp/profile/saml2/SSOProfileHandler.java

index fa15cfe..19af4cc 100644 (file)
@@ -376,7 +376,6 @@ public abstract class AbstractSAMLProfileHandler extends
      * @throws ProfileException thrown if there is a problem populating the profile information
      */
     protected void populateProfileInformation(BaseSAMLProfileRequestContext requestContext) throws ProfileException {
      * @throws ProfileException thrown if there is a problem populating the profile information
      */
     protected void populateProfileInformation(BaseSAMLProfileRequestContext requestContext) throws ProfileException {
-        requestContext.setCommunicationProfileId(getProfileId());
         AbstractSAMLProfileConfiguration profileConfig = (AbstractSAMLProfileConfiguration) requestContext
                 .getRelyingPartyConfiguration().getProfileConfiguration(getProfileId());
         if (profileConfig != null) {
         AbstractSAMLProfileConfiguration profileConfig = (AbstractSAMLProfileConfiguration) requestContext
                 .getRelyingPartyConfiguration().getProfileConfiguration(getProfileId());
         if (profileConfig != null) {
index e90f7c7..fbd209f 100644 (file)
@@ -139,6 +139,7 @@ public class ArtifactResolution extends AbstractSAML1ProfileHandler {
         log.debug("Decoding message with decoder binding {}", getInboundBinding());
 
         ArtifactResolutionRequestContext requestContext = new ArtifactResolutionRequestContext();
         log.debug("Decoding message with decoder binding {}", getInboundBinding());
 
         ArtifactResolutionRequestContext requestContext = new ArtifactResolutionRequestContext();
+        requestContext.setCommunicationProfileId(getProfileId());
 
         MetadataProvider metadataProvider = getMetadataProvider();
         requestContext.setMetadataProvider(metadataProvider);
 
         MetadataProvider metadataProvider = getMetadataProvider();
         requestContext.setMetadataProvider(metadataProvider);
index 8cc5ab3..498ba61 100644 (file)
@@ -136,6 +136,7 @@ public class AttributeQueryProfileHandler extends AbstractSAML1ProfileHandler {
         log.debug("Decoding message with decoder binding {}", getInboundBinding());
 
         AttributeQueryContext requestContext = new AttributeQueryContext();
         log.debug("Decoding message with decoder binding {}", getInboundBinding());
 
         AttributeQueryContext requestContext = new AttributeQueryContext();
+        requestContext.setCommunicationProfileId(getProfileId());
 
         MetadataProvider metadataProvider = getMetadataProvider();
         requestContext.setMetadataProvider(metadataProvider);
 
         MetadataProvider metadataProvider = getMetadataProvider();
         requestContext.setMetadataProvider(metadataProvider);
index 80b4010..da1ab1f 100644 (file)
@@ -183,6 +183,8 @@ public class ShibbolethSSOProfileHandler extends AbstractSAML1ProfileHandler {
         HttpServletRequest httpRequest = ((HttpServletRequestAdapter) inTransport).getWrappedRequest();
 
         ShibbolethSSORequestContext requestContext = new ShibbolethSSORequestContext();
         HttpServletRequest httpRequest = ((HttpServletRequestAdapter) inTransport).getWrappedRequest();
 
         ShibbolethSSORequestContext requestContext = new ShibbolethSSORequestContext();
+        requestContext.setCommunicationProfileId(getProfileId());
+        
         requestContext.setMetadataProvider(getMetadataProvider());
         requestContext.setSecurityPolicyResolver(getSecurityPolicyResolver());
 
         requestContext.setMetadataProvider(getMetadataProvider());
         requestContext.setSecurityPolicyResolver(getSecurityPolicyResolver());
 
@@ -282,6 +284,7 @@ public class ShibbolethSSOProfileHandler extends AbstractSAML1ProfileHandler {
     protected ShibbolethSSORequestContext buildRequestContext(ShibbolethSSOLoginContext loginContext,
             HTTPInTransport in, HTTPOutTransport out) throws ProfileException {
         ShibbolethSSORequestContext requestContext = new ShibbolethSSORequestContext();
     protected ShibbolethSSORequestContext buildRequestContext(ShibbolethSSOLoginContext loginContext,
             HTTPInTransport in, HTTPOutTransport out) throws ProfileException {
         ShibbolethSSORequestContext requestContext = new ShibbolethSSORequestContext();
+        requestContext.setCommunicationProfileId(getProfileId());
 
         requestContext.setMessageDecoder(getMessageDecoders().get(getInboundBinding()));
 
 
         requestContext.setMessageDecoder(getMessageDecoders().get(getInboundBinding()));
 
index b437bfc..d4e4e95 100644 (file)
@@ -155,6 +155,7 @@ public class ArtifactResolution extends AbstractSAML2ProfileHandler {
         log.debug("Decoding message with decoder binding {}", getInboundBinding());
 
         ArtifactResolutionRequestContext requestContext = new ArtifactResolutionRequestContext();
         log.debug("Decoding message with decoder binding {}", getInboundBinding());
 
         ArtifactResolutionRequestContext requestContext = new ArtifactResolutionRequestContext();
+        requestContext.setCommunicationProfileId(getProfileId());
 
         MetadataProvider metadataProvider = getMetadataProvider();
         requestContext.setMetadataProvider(metadataProvider);
 
         MetadataProvider metadataProvider = getMetadataProvider();
         requestContext.setMetadataProvider(metadataProvider);
index b751edc..4773a23 100644 (file)
@@ -141,6 +141,7 @@ public class AttributeQueryProfileHandler extends AbstractSAML2ProfileHandler {
         log.debug("Decoding message with decoder binding {}", getInboundBinding());
 
         AttributeQueryContext requestContext = new AttributeQueryContext();
         log.debug("Decoding message with decoder binding {}", getInboundBinding());
 
         AttributeQueryContext requestContext = new AttributeQueryContext();
+        requestContext.setCommunicationProfileId(getProfileId());
 
         MetadataProvider metadataProvider = getMetadataProvider();
         requestContext.setMetadataProvider(metadataProvider);
 
         MetadataProvider metadataProvider = getMetadataProvider();
         requestContext.setMetadataProvider(metadataProvider);
index a05a018..0a0aea6 100644 (file)
@@ -278,6 +278,8 @@ public class SSOProfileHandler extends AbstractSAML2ProfileHandler {
             throws ProfileException {
         log.debug("Decoding message with decoder binding {}", getInboundBinding());
         SSORequestContext requestContext = new SSORequestContext();
             throws ProfileException {
         log.debug("Decoding message with decoder binding {}", getInboundBinding());
         SSORequestContext requestContext = new SSORequestContext();
+        requestContext.setCommunicationProfileId(getProfileId());
+        
         requestContext.setMetadataProvider(getMetadataProvider());
         requestContext.setSecurityPolicyResolver(getSecurityPolicyResolver());
 
         requestContext.setMetadataProvider(getMetadataProvider());
         requestContext.setSecurityPolicyResolver(getSecurityPolicyResolver());
 
@@ -327,6 +329,7 @@ public class SSOProfileHandler extends AbstractSAML2ProfileHandler {
     protected SSORequestContext buildRequestContext(Saml2LoginContext loginContext, HTTPInTransport in,
             HTTPOutTransport out) throws ProfileException {
         SSORequestContext requestContext = new SSORequestContext();
     protected SSORequestContext buildRequestContext(Saml2LoginContext loginContext, HTTPInTransport in,
             HTTPOutTransport out) throws ProfileException {
         SSORequestContext requestContext = new SSORequestContext();
+        requestContext.setCommunicationProfileId(getProfileId());
 
         requestContext.setMessageDecoder(getMessageDecoders().get(getInboundBinding()));
 
 
         requestContext.setMessageDecoder(getMessageDecoders().get(getInboundBinding()));