[java-identity-provider COMMIT] in /trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml: profile/impl/BaseIdPIn...

noreply at shibboleth.net noreply at shibboleth.net
Tue Mar 1 17:13:32 EST 2016


Author: scantor
Date: Tue Mar  1 17:13:32 2016
New Revision: 8113

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=8113&view=rev
Log:
Cleanup duplication of binding descriptor beans, and leverage that to get BindingDescriptor injected during inbound decode.

Modified:
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/impl/BaseIdPInitiatedSSORequestMessageDecoder.java
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/impl/IdPInitiatedSSORequestMessageDecoder.java
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/delegation/messaging/impl/LibertyHTTPSOAP11Decoder.java

Modified: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/impl/BaseIdPInitiatedSSORequestMessageDecoder.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/impl/BaseIdPInitiatedSSORequestMessageDecoder.java?rev=8113&r1=8112&r2=8113&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/impl/BaseIdPInitiatedSSORequestMessageDecoder.java	(original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/impl/BaseIdPInitiatedSSORequestMessageDecoder.java	Tue Mar  1 17:13:32 2016
@@ -29,6 +29,8 @@
 
 import org.opensaml.messaging.decoder.MessageDecodingException;
 import org.opensaml.messaging.decoder.servlet.AbstractHttpServletRequestMessageDecoder;
+import org.opensaml.saml.common.binding.BindingDescriptor;
+import org.opensaml.saml.common.messaging.context.SAMLBindingContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -56,11 +58,32 @@
     /** Class logger. */
     @Nonnull private final Logger log = LoggerFactory.getLogger(BaseIdPInitiatedSSORequestMessageDecoder.class);
     
+    /** Optional {@link BindingDescriptor} to inject into {@link SAMLBindingContext} created. */
+    @Nullable private BindingDescriptor bindingDescriptor;
+    
     /** Used to log protocol messages. */
     @Nonnull private final Logger protocolMessageLog = LoggerFactory.getLogger("PROTOCOL_MESSAGE");
     
     /** ID generator. */
     @Nonnull private final IdentifierGenerationStrategy idGenerator = new Type4UUIDIdentifierGenerationStrategy();
+    
+    /**
+     * Get an optional {@link BindingDescriptor} to inject into {@link SAMLBindingContext} created.
+     * 
+     * @return binding descriptor
+     */
+    @Nullable public BindingDescriptor getBindingDescriptor() {
+        return bindingDescriptor;
+    }
+    
+    /**
+     * Set an optional {@link BindingDescriptor} to inject into {@link SAMLBindingContext} created.
+     * 
+     * @param descriptor a binding descriptor
+     */
+    public void setBindingDescriptor(@Nullable final BindingDescriptor descriptor) {
+        bindingDescriptor = descriptor;
+    }
     
     /** {@inheritDoc} */
     @Override

Modified: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/impl/IdPInitiatedSSORequestMessageDecoder.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/impl/IdPInitiatedSSORequestMessageDecoder.java?rev=8113&r1=8112&r2=8113&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/impl/IdPInitiatedSSORequestMessageDecoder.java	(original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml1/profile/impl/IdPInitiatedSSORequestMessageDecoder.java	Tue Mar  1 17:13:32 2016
@@ -90,6 +90,7 @@
         SAMLBindingContext bindingContext = messageContext.getSubcontext(SAMLBindingContext.class, true);
         bindingContext.setRelayState(relayState);
         bindingContext.setBindingUri(getBindingURI());
+        bindingContext.setBindingDescriptor(getBindingDescriptor());
         bindingContext.setHasBindingSignature(false);
         bindingContext.setIntendedDestinationEndpointURIRequired(false);
     }

Modified: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/delegation/messaging/impl/LibertyHTTPSOAP11Decoder.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/delegation/messaging/impl/LibertyHTTPSOAP11Decoder.java?rev=8113&r1=8112&r2=8113&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/delegation/messaging/impl/LibertyHTTPSOAP11Decoder.java	(original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/delegation/messaging/impl/LibertyHTTPSOAP11Decoder.java	Tue Mar  1 17:13:32 2016
@@ -19,9 +19,12 @@
 
 import java.io.IOException;
 
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 import javax.servlet.http.HttpServletRequest;
 
 import net.shibboleth.idp.saml.saml2.profile.delegation.impl.LibertyConstants;

[... 68 lines stripped ...]


More information about the commits mailing list