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

noreply at shibboleth.net noreply at shibboleth.net
Tue Apr 29 11:27:46 EDT 2014


Author: scantor
Date: Tue Apr 29 11:27:46 2014
New Revision: 5793

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5793&view=rev
Log:
Eliminate duplication of artifact source ID.

Modified:
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/impl/PopulateBindingAndEndpointContexts.java

Modified: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/impl/PopulateBindingAndEndpointContexts.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/impl/PopulateBindingAndEndpointContexts.java?rev=5793&r1=5792&r2=5793&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/impl/PopulateBindingAndEndpointContexts.java (original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/impl/PopulateBindingAndEndpointContexts.java Tue Apr 29 11:27:46 2014
@@ -26,7 +26,6 @@
 
 import net.shibboleth.idp.profile.AbstractProfileAction;
 import net.shibboleth.idp.profile.context.RelyingPartyContext;
-import net.shibboleth.idp.profile.context.navigate.ResponderIdLookupFunction;
 import net.shibboleth.idp.saml.profile.config.SAMLArtifactConfiguration;
 import net.shibboleth.idp.saml.profile.config.SAMLProfileConfiguration;
 import net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration;
@@ -116,9 +115,6 @@
 
     /** Strategy function for access to {@link RelyingPartyContext}. */
     @Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategy;
-
-    /** Strategy used to obtain the self identity value. */
-    @Nullable private Function<ProfileRequestContext,String> selfIdentityLookupStrategy;
     
     /** Strategy function for access to {@link SAMLMetadataContext} for input to resolver. */
     @Nonnull private Function<ProfileRequestContext,SAMLMetadataContext> metadataContextLookupStrategy;
@@ -153,7 +149,6 @@
         bindingDescriptors = Collections.emptyList();
         
         relyingPartyContextLookupStrategy = new ChildContextLookup<>(RelyingPartyContext.class);
-        selfIdentityLookupStrategy = new ResponderIdLookupFunction();
         
         // Default: outbound msg context -> SAMLPeerEntityContext -> SAMLMetadataContext
         metadataContextLookupStrategy = Functions.compose(
@@ -221,17 +216,6 @@
         
         relyingPartyContextLookupStrategy = Constraint.isNotNull(strategy,
                 "RelyingPartyContext lookup strategy cannot be null");
-    }
-
-    /**
-     * Set the strategy used to locate the self identity value to use.
-     * 
-     * @param strategy lookup strategy
-     */
-    public void setSelfIdentityLookupStrategy(@Nonnull final Function<ProfileRequestContext,String> strategy) {
-        ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
-
-        selfIdentityLookupStrategy = Constraint.isNotNull(strategy, "Self identity lookup strategy cannot be null");
     }
     
     /**
@@ -403,16 +387,15 @@
         bindingCtx.setBindingUri(resolvedEndpoint.getBinding());
         
         // Handle artifact details.
-        final Optional<BindingDescriptor> bindingDescriptor = Iterables.tryFind(bindingDescriptors,
-                new Predicate<BindingDescriptor>() {
-                    public boolean apply(BindingDescriptor input) {
-                        return input.getId().equals(bindingCtx.getBindingUri());
-                    }
-        });
-        if (bindingDescriptor.isPresent() && bindingDescriptor.get().isArtifact()) {
-            final SAMLArtifactContext artifactCtx = artifactContextLookupStrategy.apply(profileRequestContext);
-            artifactCtx.setSourceEntityId(selfIdentityLookupStrategy.apply(profileRequestContext));
-            if (artifactConfiguration != null) {
+        if (artifactConfiguration != null) {
+            final Optional<BindingDescriptor> bindingDescriptor = Iterables.tryFind(bindingDescriptors,
+                    new Predicate<BindingDescriptor>() {
+                        public boolean apply(BindingDescriptor input) {
+                            return input.getId().equals(bindingCtx.getBindingUri());
+                        }
+            });
+            if (bindingDescriptor.isPresent() && bindingDescriptor.get().isArtifact()) {
+                final SAMLArtifactContext artifactCtx = artifactContextLookupStrategy.apply(profileRequestContext);
                 artifactCtx.setArtifactType(artifactConfiguration.getArtifactType());
                 artifactCtx.setSourceArtifactResolutionServiceEndpointURL(
                         artifactConfiguration.getArtifactResolutionServiceURL());



More information about the commits mailing list