[java-identity-provider COMMIT] in /trunk: idp-profile-api/src/test/java/net/shibboleth/idp/profile/RequestContextBui...
noreply at shibboleth.net
noreply at shibboleth.net
Mon Apr 28 12:32:38 EDT 2014
Author: scantor
Date: Mon Apr 28 12:32:38 2014
New Revision: 5781
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5781&view=rev
Log:
Cleanup artifact encoders, and get rid of message metadata context.
Modified:
trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/RequestContextBuilder.java
trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/InitializeRelyingPartyContext.java
Modified: trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/RequestContextBuilder.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/RequestContextBuilder.java?rev=5781&r1=5780&r2=5781&view=diff
==============================================================================
--- trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/RequestContextBuilder.java (original)
+++ trunk/idp-profile-api/src/test/java/net/shibboleth/idp/profile/RequestContextBuilder.java Mon Apr 28 12:32:38 2014
@@ -33,7 +33,6 @@
import net.shibboleth.idp.relyingparty.RelyingPartyConfiguration;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
-import org.opensaml.messaging.context.BasicMessageMetadataContext;
import org.opensaml.messaging.context.MessageContext;
import org.opensaml.profile.context.ProfileRequestContext;
import org.springframework.mock.web.MockHttpServletRequest;
@@ -359,52 +358,7 @@
@Nonnull protected MessageContext buildInboundMessageContext() {
final MessageContext context = new MessageContext();
context.setMessage(inboundMessage);
- buildInboudMessageMetadataContext(context);
return context;
- }
-
- /**
- * Builds a {@link BasicMessageMetadataContext} and adds it to the given inbound {@link MessageContext}.
- *
- * The default implementation builds a {@link BasicMessageMetadataContext} that contains:
- * <ul>
- * <li>a message ID provided by {@link #setInboundMessageId(String)} or {@link ActionTestingSupport#INBOUND_MSG_ID}
- * if none is given</li>
- * <li>a message issue instant provided by {@link #setInboundMessageIssueInstant(long)} or 0 (1970-01-01T00:00:00Z)
- * if none is given</li>
- * <li>a message issuer provided by {@link #setInboundMessageIssuer(String)} or
- * {@link ActionTestingSupport#INBOUND_MSG_ISSUER} if none is given
- * </ul>
- *
- * @param inboundMsgCtx the inbound message context to which the constructed {@link BasicMessageMetadataContext} is
- * added
- *
- * @return the constructed {@link BasicMessageMetadataContext}
- */
- @Nullable protected BasicMessageMetadataContext buildInboudMessageMetadataContext(
- @Nonnull final MessageContext inboundMsgCtx) {
- if (Objects.equal(NO_VAL, inboundMessageId) && Objects.equal(NO_VAL, inboundMessageIssuer)) {
- return null;
- }
-
- final BasicMessageMetadataContext metadataCtx = new BasicMessageMetadataContext();
- inboundMsgCtx.addSubcontext(metadataCtx);
-
- if (Objects.equal(NO_VAL, inboundMessageId)) {
- metadataCtx.setMessageId(ActionTestingSupport.OUTBOUND_MSG_ID);
- } else {
- metadataCtx.setMessageId(inboundMessageId);
- }
-
- metadataCtx.setMessageIssueInstant(inboundMessageIssueInstant);
-
- if (Objects.equal(NO_VAL, inboundMessageIssuer)) {
- metadataCtx.setMessageIssuer(ActionTestingSupport.OUTBOUND_MSG_ISSUER);
- } else {
- metadataCtx.setMessageIssuer(inboundMessageIssuer);
- }
-
- return metadataCtx;
}
/**
@@ -421,53 +375,8 @@
@Nonnull protected MessageContext buildOutboundMessageContext() {
final MessageContext context = new MessageContext();
context.setMessage(outboundMessage);
- buildInboudMessageMetadataContext(context);
return context;
- }
-
- /**
- * Builds a {@link BasicMessageMetadataContext} and adds it to the given outbound {@link MessageContext}.
- *
- * The default implementation builds a {@link BasicMessageMetadataContext} that contains:
- * <ul>
- * <li>a message ID provided by {@link #setOutboundMessageId(String)} or {@link ActionTestingSupport#INBOUND_MSG_ID}
- * if none is given</li>
- * <li>a message issue instant provided by {@link #setOutboundMessageIssueInstant(long)} or 0 (1970-01-01T00:00:00Z)
- * if none is given</li>
- * <li>a message issuer provided by {@link #setOutboundMessageIssuer(String)} or
- * {@link ActionTestingSupport#INBOUND_MSG_ISSUER} if none is given
- * </ul>
- *
- * @param outboundMsgCtx the outbound message context to which the constructed {@link BasicMessageMetadataContext}
- * is added
- *
- * @return the constructed {@link BasicMessageMetadataContext}
- */
- @Nonnull protected BasicMessageMetadataContext buildOutboundMessageMetadataContext(
- @Nonnull final MessageContext outboundMsgCtx) {
[... 26 lines stripped ...]
More information about the commits
mailing list