[java-identity-provider COMMIT] in /trunk/idp-authn-impl/src: main/java/net/shibboleth/idp/authn/impl/SelectAuthentic...

noreply at shibboleth.net noreply at shibboleth.net
Thu May 21 15:38:39 EDT 2015


Author: scantor
Date: Thu May 21 15:38:39 2015
New Revision: 7527

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7527&view=rev
Log:
IDP-699 - eliminate side effect of choosing a matching custom Principal

Modified:
    trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlow.java
    trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlowTest.java

Modified: trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlow.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlow.java?rev=7527&r1=7526&r2=7527&view=diff
==============================================================================
--- trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlow.java	(original)
+++ trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlow.java	Thu May 21 15:38:39 2015
@@ -180,8 +180,6 @@
                         if (factory != null) {
                             final PrincipalEvalPredicate predicate = factory.getPredicate(p);
                             if (predicate.apply(activeResult)) {
-                                // This will be rechecked at the end of the authentication flow.
-                                requestedPrincipalCtx.setMatchingPrincipal(predicate.getMatchingPrincipal());
                                 selectActiveResult(profileRequestContext, authenticationContext, activeResult);
                                 return;
                             }
@@ -208,8 +206,6 @@
                 if (factory != null) {
                     final PrincipalEvalPredicate predicate = factory.getPredicate(p);
                     if (predicate.apply(flow)) {
-                        // This will be rechecked at the end of the authentication flow.
-                        requestedPrincipalCtx.setMatchingPrincipal(predicate.getMatchingPrincipal());
                         selectInactiveFlow(profileRequestContext, authenticationContext, flow);
                         return;
                     }
@@ -378,8 +374,6 @@
                 for (final AuthenticationFlowDescriptor descriptor : potentialFlows.values()) {
                     if (!authenticationContext.getIntermediateFlows().containsKey(descriptor.getId())
                             && predicate.apply(descriptor)) {
-                        // This will be rechecked at the end of the authentication flow.
-                        requestedPrincipalCtx.setMatchingPrincipal(predicate.getMatchingPrincipal());
                         selectInactiveFlow(profileRequestContext, authenticationContext, descriptor);
                         return;
                     }
@@ -422,8 +416,6 @@
                     final PrincipalEvalPredicate predicate = factory.getPredicate(p);
                     for (final AuthenticationResult result : activeResults.values()) {
                         if (predicate.apply(result)) {
-                            // This will be rechecked at the end of the authentication flow.
-                            requestedPrincipalCtx.setMatchingPrincipal(predicate.getMatchingPrincipal());
                             selectActiveResult(profileRequestContext, authenticationContext, result);
                             return;
                         }
@@ -466,8 +458,6 @@
                             } else {
                                 selectActiveResult(profileRequestContext, authenticationContext, result);
                             }
-                            // This will be rechecked at the end of the authentication flow.
-                            requestedPrincipalCtx.setMatchingPrincipal(predicate.getMatchingPrincipal());
                             return;
                         }
                     }

Modified: trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlowTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlowTest.java?rev=7527&r1=7526&r2=7527&view=diff
==============================================================================
--- trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlowTest.java	(original)
+++ trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlowTest.java	Thu May 21 15:38:39 2015
@@ -108,7 +108,6 @@
         final Event event = action.execute(src);
         
         ActionTestingSupport.assertEvent(event, AuthnEventIds.REQUEST_UNSUPPORTED);
-        Assert.assertNull(rpc.getMatchingPrincipal());
     }
 
     @Test public void testRequestNoneActive() {
@@ -124,7 +123,6 @@
         
         Assert.assertNull(authCtx.getAuthenticationResult());
         Assert.assertEquals(authCtx.getAttemptedFlow().getId(), "test3");
-        Assert.assertEquals(rpc.getMatchingPrincipal().getName(), "test3");
     }
 

[... 33 lines stripped ...]


More information about the commits mailing list