[java-identity-provider COMMIT] in /trunk/idp-saml-impl/src: main/java/net/shibboleth/idp/saml/impl/profile/saml1/Add...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Feb 18 14:35:34 EST 2014
Author: tzeller
Date: Tue Feb 18 14:35:34 2014
New Revision: 5394
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5394&view=rev
Log:
IDP-367 : Rebase AddResponseShell actions on n.s.i.p.AbstractProfileAction.
Modified:
trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml1/AddResponseShell.java
trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/AddResponseShell.java
trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml1/AddResponseShellTest.java
trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml2/AddResponseShellTest.java
Modified: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml1/AddResponseShell.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml1/AddResponseShell.java?rev=5394&r1=5393&r2=5394&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml1/AddResponseShell.java (original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml1/AddResponseShell.java Tue Feb 18 14:35:34 2014
@@ -20,14 +20,8 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
+import net.shibboleth.idp.profile.AbstractProfileAction;
import net.shibboleth.idp.profile.IdPEventIds;
-
-import org.opensaml.profile.ProfileException;
-import org.opensaml.profile.action.AbstractProfileAction;
-import org.opensaml.profile.action.ActionSupport;
-import org.opensaml.profile.action.EventIds;
-import org.opensaml.profile.context.ProfileRequestContext;
-
import net.shibboleth.idp.profile.config.ProfileConfiguration;
import net.shibboleth.idp.relyingparty.RelyingPartyContext;
import net.shibboleth.utilities.java.support.component.ComponentSupport;
@@ -40,6 +34,10 @@
import org.opensaml.messaging.context.BasicMessageMetadataContext;
import org.opensaml.messaging.context.MessageContext;
import org.opensaml.messaging.context.navigate.ChildContextLookup;
+import org.opensaml.profile.ProfileException;
+import org.opensaml.profile.action.ActionSupport;
+import org.opensaml.profile.action.EventIds;
+import org.opensaml.profile.context.ProfileRequestContext;
import org.opensaml.saml.common.SAMLObjectBuilder;
import org.opensaml.saml.common.SAMLVersion;
import org.opensaml.saml.saml1.core.Response;
@@ -66,7 +64,7 @@
* @post ProfileRequestContext.getOutboundMessageContext().getSubcontext(
* BasicMessageMetadataContext.class, false) != null
*/
-public class AddResponseShell extends AbstractProfileAction<Object, Response> {
+public class AddResponseShell extends AbstractProfileAction {
/** Class logger. */
@Nonnull private Logger log = LoggerFactory.getLogger(AddResponseShell.class);
@@ -77,8 +75,8 @@
@Nonnull private Function<ProfileRequestContext, RelyingPartyContext> relyingPartyContextLookupStrategy;
/** Profile configuration for request. */
- @Nullable private ProfileConfiguration profileConfig;
-
+ @Nullable private ProfileConfiguration profileConfig;
+
/** Constructor. */
public AddResponseShell() {
relyingPartyContextLookupStrategy = new ChildContextLookup<>(RelyingPartyContext.class, false);
@@ -98,15 +96,14 @@
relyingPartyContextLookupStrategy =
Constraint.isNotNull(strategy, "RelyingPartyContext lookup strategy cannot be null");
}
-
+
/** {@inheritDoc} */
@Override
- protected boolean doPreExecute(@Nonnull final ProfileRequestContext<Object, Response> profileRequestContext)
- throws ProfileException {
+ protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext) throws ProfileException {
final MessageContext<Response> outboundMessageCtx = profileRequestContext.getOutboundMessageContext();
if (outboundMessageCtx == null) {
- log.debug("{} Outbound message context did not exist", getLogPrefix());
+ log.debug("{} No outbound message context", getLogPrefix());
ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_MSG_CTX);
return false;
} else if (outboundMessageCtx.getMessage() != null) {
@@ -117,25 +114,24 @@
final RelyingPartyContext relyingPartyCtx = relyingPartyContextLookupStrategy.apply(profileRequestContext);
if (relyingPartyCtx == null) {
- log.debug("{} No relying party context located in current profile request context", getLogPrefix());
+ log.debug("{} No relying party context", getLogPrefix());
ActionSupport.buildEvent(profileRequestContext, IdPEventIds.INVALID_RELYING_PARTY_CTX);
return false;
}
profileConfig = relyingPartyCtx.getProfileConfig();
if (profileConfig == null || profileConfig.getSecurityConfiguration() == null) {
[... 315 lines stripped ...]
More information about the commits
mailing list