Author: scantor
Date: Mon Jul 25 21:17:07 2016
New Revision: 8303
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=8303&view=rev
Log:
IDP-962 - Login flow or framework for combining authentication factors
Simpler syntax for proceed-triggered functions.
Modified:
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/MultiFactorAuthenticationTransition.java
trunk/idp-conf/src/main/resources/conf/authn/mfa-authn-config.xml
Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/MultiFactorAuthenticationTransition.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/MultiFactorAuthenticationTransition.java?rev=8303&r1=8302&r2=8303&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/MultiFactorAuthenticationTransition.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/MultiFactorAuthenticationTransition.java Mon Jul 25 21:17:07 2016
@@ -127,4 +127,16 @@
setNextFlowStrategyMap(Collections.<String,Object>singletonMap("proceed", flowId));
}
+ /**
+ * Set a function to run directly instead of using a strategy map.
+ *
+ * <p>The transition rule is implicitly based on a "proceed" event occurring,
+ * and assumes no custom transitions for any other events.</p>
+
+ * @param strategy function to run
+ */
+ public void setNextFlowStrategy(@Nullable final Function<ProfileRequestContext,String> strategy) {
+ setNextFlowStrategyMap(Collections.<String,Object>singletonMap("proceed", strategy));
+ }
+
}
Modified: trunk/idp-conf/src/main/resources/conf/authn/mfa-authn-config.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/conf/authn/mfa-authn-config.xml?rev=8303&r1=8302&r2=8303&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/conf/authn/mfa-authn-config.xml (original)
+++ trunk/idp-conf/src/main/resources/conf/authn/mfa-authn-config.xml Mon Jul 25 21:17:07 2016
@@ -45,13 +45,7 @@
factor is required.
-->
<entry key="authn/IPAddress">
- <bean parent="shibboleth.authn.MFA.Transition">
- <property name="nextFlowStrategyMap">
- <map>
- <entry key="proceed" value-ref="checkSecondFactor" />
- </map>
- </property>
- </bean>
+ <bean parent="shibboleth.authn.MFA.Transition" p:nextFlowStrategy-ref="checkSecondFactor" />
</entry>
<!-- An implicit final rule will return whatever the final flow returns. -->