[java-identity-provider COMMIT] in /trunk: idp-conf/src/main/resources/system/flows/post-authn/post-authn-flow.xml id...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Sep 9 13:13:56 EDT 2014
Author: tzeller
Date: Tue Sep 9 13:13:56 2014
New Revision: 6516
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6516&view=rev
Log:
Return null if there are no available interceptor flows to execute.
Modified:
trunk/idp-conf/src/main/resources/system/flows/post-authn/post-authn-flow.xml
trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/interceptor/SelectProfileInterceptorFlow.java
Modified: trunk/idp-conf/src/main/resources/system/flows/post-authn/post-authn-flow.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/system/flows/post-authn/post-authn-flow.xml?rev=6516&r1=6515&r2=6516&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/system/flows/post-authn/post-authn-flow.xml (original)
+++ trunk/idp-conf/src/main/resources/system/flows/post-authn/post-authn-flow.xml Tue Sep 9 13:13:56 2014
@@ -24,12 +24,12 @@
-->
<action-state id="SelectPostAuthnFlow">
<evaluate expression="SelectPostAuthnFlow" />
+ <evaluate expression="'proceed'" />
<!-- Call a subflow with the same ID as the event. -->
<transition on="#{currentEvent.id.startsWith('post-authn/')}" to="CallPostAuthnFlow" />
-
- <!-- Proceed if there are no flows available to be executed. -->
- <transition on="NoPotentialFlow" to="proceed" />
+
+ <transition on="proceed" to="proceed" />
</action-state>
<!--
Modified: trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/interceptor/SelectProfileInterceptorFlow.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/interceptor/SelectProfileInterceptorFlow.java?rev=6516&r1=6515&r2=6516&view=diff
==============================================================================
--- trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/interceptor/SelectProfileInterceptorFlow.java (original)
+++ trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/interceptor/SelectProfileInterceptorFlow.java Tue Sep 9 13:13:56 2014
@@ -20,17 +20,27 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-import net.shibboleth.idp.authn.AuthnEventIds;
+import net.shibboleth.idp.profile.ActionSupport;
-import org.opensaml.profile.action.ActionSupport;
import org.opensaml.profile.context.ProfileRequestContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- * A profile interceptor flow action that selects profile interceptor flows to execute.
+ * A profile action that selects flows to invoke.
*
- * TODO
+ * <p>
+ * The flows available to be executed are held by the {@link ProfileInterceptorContext}. Available flows are executed in
+ * the order that they are configured if their activation condition evaluates to true.
+ * </p>
+ *
+ * <p>
+ * This action returns the flow ID to be executed or null if there are no flows available.
+ * to be executed.
+ * </p>
+ *
+ * @event Selected flow ID to execute
+ * @pre <pre>ProfileRequestContext.getSubcontext(ProfileInterceptorContext.class, true) != null</pre>
*/
public class SelectProfileInterceptorFlow extends AbstractProfileInterceptorAction {
@@ -41,11 +51,11 @@
@Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext,
@Nonnull final ProfileInterceptorContext interceptorContext) {
- // Detect a previous attempted flow, and move it to the intermediate collection.
+ // Detect a previous attempted flow, and move it to the incomplete collection.
// This will prevent re-selecting the same (probably failed) flow again.
if (interceptorContext.getAttemptedFlow() != null) {
- log.info("{} Moving incomplete flow {} to intermediate set, reselecting a different one", getLogPrefix(),
- interceptorContext.getAttemptedFlow().getId());
+ log.info("{} Flow {} did not complete, moving to incomplete set", getLogPrefix(), interceptorContext
+ .getAttemptedFlow().getId());
interceptorContext.getIncompleteFlows().put(interceptorContext.getAttemptedFlow().getId(),
interceptorContext.getAttemptedFlow());
}
@@ -60,11 +70,10 @@
final ProfileInterceptorFlowDescriptor flow = selectUnattemptedFlow(profileRequestContext, interceptorContext);
if (flow == null) {
log.debug("{} No flows available to choose from", getLogPrefix());
- ActionSupport.buildEvent(profileRequestContext, AuthnEventIds.NO_POTENTIAL_FLOW);
return;
}
- log.debug("{} Selecting interceptor flow {}", getLogPrefix(), flow.getId());
+ log.debug("{} Selecting flow {}", getLogPrefix(), flow.getId());
ActionSupport.buildEvent(profileRequestContext, flow.getId());
}
@@ -81,12 +90,12 @@
@Nonnull final ProfileInterceptorContext interceptorContext) {
[... 14 lines stripped ...]
More information about the commits
mailing list