[java-identity-provider COMMIT] in /trunk: idp-profile-api/src/main/java/net/shibboleth/idp/profile/InvalidProfileReq...
noreply at shibboleth.net
noreply at shibboleth.net
Fri Jul 20 11:04:06 EDT 2012
Author: lajoie
Date: Fri Jul 20 11:04:06 2012
New Revision: 4214
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4214&view=rev
Log:
remove deprecated exception
clean up replay detection stage
Modified:
trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/InvalidProfileRequestContextStateException.java
trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/CheckMessageReplay.java
Modified: trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/CheckMessageReplay.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/CheckMessageReplay.java?rev=4214&r1=4213&r2=4214&view=diff
==============================================================================
--- trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/CheckMessageReplay.java (original)
+++ trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/CheckMessageReplay.java Fri Jul 20 11:04:06 2012
@@ -18,115 +18,69 @@
package net.shibboleth.idp.profile.impl;
import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.shibboleth.idp.profile.AbstractProfileAction;
import net.shibboleth.idp.profile.ActionSupport;
-import net.shibboleth.idp.profile.InvalidProfileRequestContextStateException;
+import net.shibboleth.idp.profile.EventIds;
import net.shibboleth.idp.profile.ProfileException;
import net.shibboleth.idp.profile.ProfileRequestContext;
-import net.shibboleth.utilities.java.support.component.ComponentSupport;
-import net.shibboleth.utilities.java.support.logic.Constraint;
import org.opensaml.messaging.context.BasicMessageMetadataContext;
import org.opensaml.messaging.context.MessageContext;
-import org.opensaml.messaging.context.navigate.ChildContextLookup;
import org.opensaml.util.storage.ReplayCache;
-import org.springframework.webflow.execution.Event;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.webflow.execution.RequestContext;
-
-import com.google.common.base.Function;
/** Checks that the given message has not be replayed. */
public final class CheckMessageReplay extends AbstractProfileAction {
+ /** ID of event returned if a message is being replayed. */
+ public static final String REPLAYED_MSG = "ReplayedMessage";
+
+ /** Class logger. */
+ private final Logger log = LoggerFactory.getLogger(CheckMessageReplay.class);
+
/** Cache used to store message issuer/id pairs and check to see if a message is being replayed. */
private ReplayCache replayCache;
- /**
- * Strategy used to look up the {@link BasicMessageMetadataContext} associated with the inbound message context.
- */
- private Function<MessageContext, BasicMessageMetadataContext> messageMetadataContextLookupStrategy;
+ /** {@inheritDoc} */
+ protected org.springframework.webflow.execution.Event doExecute(@Nullable final HttpServletRequest httpRequest,
+ @Nullable final HttpServletResponse httpResponse, @Nullable final RequestContext springRequestContext,
+ @Nonnull final ProfileRequestContext profileRequestContext) throws ProfileException {
- /**
- * Constructor.
- *
- * Initializes {@link #messageMetadataContextLookupStrategy} to {@link ChildContextLookup}.
- */
- public CheckMessageReplay() {
- super();
-
- messageMetadataContextLookupStrategy =
- new ChildContextLookup<MessageContext, BasicMessageMetadataContext>(BasicMessageMetadataContext.class,
- false);
- }
-
- /**
- * Gets the strategy used to look up the {@link BasicMessageMetadataContext} associated with the inbound message
- * context.
- *
- * @return strategy used to look up the {@link BasicMessageMetadataContext} associated with the inbound message
- * context
- */
- public Function<MessageContext, BasicMessageMetadataContext> getMessageMetadataContextLookupStrategy() {
- return messageMetadataContextLookupStrategy;
- }
-
- /**
- * Sets the strategy used to look up the {@link BasicMessageMetadataContext} associated with the inbound message
- * context.
- *
- * @param strategy strategy used to look up the {@link BasicMessageMetadataContext} associated with the inbound
- * message context
- */
- public synchronized void setMessageMetadataContextLookupStrategy(
- @Nonnull final Function<MessageContext, BasicMessageMetadataContext> strategy) {
- ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
-
- messageMetadataContextLookupStrategy =
- Constraint.isNotNull(strategy, "Message metadata context lookup strategy can not be null");
- }
-
- /** {@inheritDoc} */
- protected Event doExecute(HttpServletRequest httpRequest, HttpServletResponse httpResponse,
[... 64 lines stripped ...]
More information about the commits
mailing list