[java-opensaml COMMIT] in /trunk: opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/SAMLBindingSupport...
noreply at shibboleth.net
noreply at shibboleth.net
Fri Feb 1 21:09:26 EST 2013
Author: putmanb
Date: Fri Feb 1 21:09:26 2013
New Revision: 3209
URL: http://svn.shibboleth.net/view/java-opensaml?rev=3209&view=rev
Log:
Port SAML received endpoint check, formerly in the decoders in v2, to helpers, a binding subcontext and a message handler.
Added:
trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/messaging/context/SamlBindingContext.java (with props)
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/security/ReceivedEndpointSecurityHandler.java (with props)
trunk/opensaml-util/src/main/java/org/opensaml/util/net/BasicUrlComparator.java (with props)
trunk/opensaml-util/src/main/java/org/opensaml/util/net/SimpleUrlCanonicalizer.java (with props)
trunk/opensaml-util/src/main/java/org/opensaml/util/net/UriComparator.java (with props)
trunk/opensaml-util/src/main/java/org/opensaml/util/net/UriException.java (with props)
trunk/opensaml-util/src/test/java/org/opensaml/util/net/SimpleUrlCanonicalizerTest.java (with props)
Modified:
trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/SAMLBindingSupport.java
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/binding/decoding/HTTPArtifactDecoder.java
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/binding/decoding/HTTPPostDecoder.java
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/binding/decoding/HTTPSOAP11Decoder.java
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/binding/decoding/HTTPArtifactDecoder.java
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/binding/decoding/HTTPPostDecoder.java
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/binding/decoding/HTTPPostSimpleSignDecoder.java
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/binding/decoding/HTTPRedirectDeflateDecoder.java
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/binding/decoding/HTTPSOAP11Decoder.java
Modified: trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/SAMLBindingSupport.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/SAMLBindingSupport.java?rev=3209&r1=3208&r2=3209&view=diff
==============================================================================
--- trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/SAMLBindingSupport.java (original)
+++ trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/binding/SAMLBindingSupport.java Fri Feb 1 21:09:26 2013
@@ -20,16 +20,27 @@
import java.net.URI;
import java.net.URISyntaxException;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
import net.shibboleth.utilities.java.support.logic.Constraint;
-
+import net.shibboleth.utilities.java.support.primitive.StringSupport;
+
+import org.opensaml.messaging.MessageException;
import org.opensaml.messaging.context.MessageContext;
+import org.opensaml.messaging.decoder.servlet.HttpServletRequestContext;
import org.opensaml.saml.common.SAMLObject;
+import org.opensaml.saml.common.SignableSAMLObject;
+import org.opensaml.saml.common.messaging.context.SamlBindingContext;
import org.opensaml.saml.common.messaging.context.SamlEndpointContext;
import org.opensaml.saml.common.messaging.context.SamlPeerEntityContext;
import org.opensaml.saml.common.messaging.context.SamlProtocolContext;
-import org.opensaml.saml.saml1.core.Response;
import org.opensaml.saml.saml2.core.StatusResponseType;
import org.opensaml.saml.saml2.metadata.Endpoint;
+import org.opensaml.util.net.BasicUrlComparator;
+import org.opensaml.util.net.UriComparator;
+import org.opensaml.util.net.UriException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -50,7 +61,7 @@
* @param messageContext the message context on which to operate
* @return the relay state or null
*/
- public static String getRelayState(MessageContext<SAMLObject> messageContext) {
+ @Nullable public static String getRelayState(@Nonnull final MessageContext<SAMLObject> messageContext) {
SamlProtocolContext protocolContext = messageContext.getSubcontext(SamlProtocolContext.class);
if (protocolContext == null) {
return null;
@@ -66,7 +77,7 @@
*
* @return true if the relay state is not empty and is less than 80 bytes
*/
- public static boolean checkRelayState(String relayState) {
+ public static boolean checkRelayState(@Nullable final String relayState) {
if (!Strings.isNullOrEmpty(relayState)) {
if (relayState.getBytes().length > 80) {
LOG.warn("Relay state exceeds 80 bytes, some application may not support this.");
@@ -89,7 +100,8 @@
*
* @throws BindingException throw if no relying party endpoint is available
*/
- public static URI getEndpointURL(MessageContext<SAMLObject> messageContext) throws BindingException {
[... 591 lines stripped ...]
More information about the commits
mailing list