[java-identity-provider] branch master updated: Remove duplicated PRC lookup strategy.

Scott Cantor cantor.2 at osu.edu
Mon Jun 3 21:57:35 EDT 2019


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch master
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=4567dde4f540a97d8438be37e4ea2e04fc10d06d

The following commit(s) were added to refs/heads/master by this push:
       new  4567dde   Remove duplicated PRC lookup strategy.
4567dde is described below

commit 4567dde4f540a97d8438be37e4ea2e04fc10d06d
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Jun 3 21:57:31 2019 -0400

    Remove duplicated PRC lookup strategy.
---
 .../resolver/dc/impl/SubjectDataConnector.java       | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/dc/impl/SubjectDataConnector.java b/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/dc/impl/SubjectDataConnector.java
index 48a650f..e2539dc 100644
--- a/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/dc/impl/SubjectDataConnector.java
+++ b/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/dc/impl/SubjectDataConnector.java
@@ -37,7 +37,6 @@ import net.shibboleth.utilities.java.support.component.ComponentSupport;
 import net.shibboleth.utilities.java.support.logic.Constraint;
 
 import org.opensaml.messaging.context.navigate.ChildContextLookup;
-import org.opensaml.messaging.context.navigate.ParentContextLookup;
 import org.opensaml.profile.context.ProfileRequestContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -52,9 +51,6 @@ public class SubjectDataConnector extends AbstractDataConnector {
 
     /** Class logger. */
     @Nonnull private final Logger log = LoggerFactory.getLogger(SubjectDataConnector.class);
-
-    /** Strategy used to locate the {@link ProfileRequestContext} to use. */
-    @Nonnull private Function<AttributeResolutionContext,ProfileRequestContext> prcLookupStrategy;
     
     /** Strategy used to locate the {@link SubjectContext} to use. */
     @Nonnull private Function<ProfileRequestContext,SubjectContext> scLookupStrategy;
@@ -64,22 +60,8 @@ public class SubjectDataConnector extends AbstractDataConnector {
     
     /** Constructor. */
     public SubjectDataConnector() {
-        prcLookupStrategy = new ParentContextLookup<>();
         scLookupStrategy = new ChildContextLookup<>(SubjectContext.class);
     }
-
-    /**
-     * Set the strategy used to locate the {@link ProfileRequestContext} associated with a given
-     * {@link AttributeResolutionContext}.
-     * 
-     * @param strategy lookup strategy
-     */
-    public void setProfileRequestContextLookupStrategy(
-            @Nonnull final Function<AttributeResolutionContext,ProfileRequestContext> strategy) {
-        ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
-
-        prcLookupStrategy = Constraint.isNotNull(strategy, "ProfileRequestContext lookup strategy cannot be null");
-    }
     
     /**
      * Sets the strategy used to locate the {@link SubjectContext} associated with a given
@@ -124,7 +106,7 @@ public class SubjectDataConnector extends AbstractDataConnector {
         ComponentSupport.ifNotInitializedThrowUninitializedComponentException(this);
         ComponentSupport.ifDestroyedThrowDestroyedComponentException(this);
         
-        final SubjectContext sc = scLookupStrategy.compose(prcLookupStrategy).apply(resolutionContext);
+        final SubjectContext sc = scLookupStrategy.compose(getProfileContextStrategy()).apply(resolutionContext);
         if (sc == null || sc.getSubjects().isEmpty()) {
             if (noResultIsError) {
                 throw new ResolutionException("No Subjects available to obtain attributes");

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list