[java-identity-provider COMMIT] in /trunk: idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthnEventIds.java id...

noreply at shibboleth.net noreply at shibboleth.net
Mon Nov 4 23:27:27 EST 2013


Author: scantor
Date: Mon Nov  4 23:27:27 2013
New Revision: 4935

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4935&view=rev
Log:
Add event indicating flow reselection, and switch flow descriptors to a linked hashmap to make iteration predictable.

Modified:
    trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthnEventIds.java
    trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationContext.java
    trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlow.java

Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthnEventIds.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthnEventIds.java?rev=4935&r1=4934&r2=4935&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthnEventIds.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthnEventIds.java Mon Nov  4 23:27:27 2013
@@ -35,6 +35,9 @@
     /** ID of event returned if the given credentials are invalid. */
     public static final String INVALID_CREDENTIALS = "InvalidCredentials";
 
+    /** ID of event returned if a flow wishes to indicate that another flow should be selected instead. */
+    public static final String RESELECT_FLOW = "ReselectFlow";
+    
     /** ID of event returned if a Subject cannot be canonicalized. */
     public static final String SUBJECT_C14N_ERROR = "SubjectCanonicalizationError";
     

Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationContext.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationContext.java?rev=4935&r1=4934&r2=4935&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationContext.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationContext.java Mon Nov  4 23:27:27 2013
@@ -18,6 +18,7 @@
 package net.shibboleth.idp.authn.context;
 
 import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.Map;
 
 import javax.annotation.Nonnull;
@@ -90,7 +91,7 @@
 
         initiationInstant = System.currentTimeMillis();
         
-        potentialFlows = new HashMap<>();
+        potentialFlows = new LinkedHashMap<>();
         activeResults = new HashMap<>();
         intermediateFlows = new HashMap<>();
         

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=4935&r1=4934&r2=4935&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 Mon Nov  4 23:27:27 2013
@@ -109,6 +109,8 @@
         // Detect a previous attempted flow, and move it to the intermediate collection.
         // This will prevent re-selecting the same (probably failed) flow again.
         if (authenticationContext.getAttemptedFlow() != null) {
+            log.info("{} moving incomplete flow {} to intermediate set, reselecting a different one", getLogPrefix(),
+                    authenticationContext.getAttemptedFlow().getId());
             authenticationContext.getIntermediateFlows().put(
                     authenticationContext.getAttemptedFlow().getId(), authenticationContext.getAttemptedFlow());
         }



More information about the commits mailing list