public class MultiFactorAuthenticationTransition extends Object
After each step/flow is successfully completed, this object supplies rules for determining what to do next with a bit of pseudo-SWF reinvention that allows an event to be mapped to a new flow to run by means of a function. If no mapping exists, or the function returns null, then the active event is simply raised as the result of the overall flow execution.
Note that raising the "proceed" event from a previous step will cause the MFA flow itself to attempt successful completion by finalizing its result.
| Modifier and Type | Field and Description |
|---|---|
private Map<String,com.google.common.base.Function<ProfileRequestContext,String>> |
nextFlowStrategyMap
A function that determines the next flow to execute.
|
| Constructor and Description |
|---|
MultiFactorAuthenticationTransition()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Function<ProfileRequestContext,String> |
getNextFlowStrategy(String event)
Get the function to run to determine the next subflow to run.
|
(package private) Map<String,com.google.common.base.Function<ProfileRequestContext,String>> |
getNextFlowStrategyMap()
Get the map of transition rules to follow.
|
void |
setNextFlow(String flowId)
Set the next flow to run directly, instead of using a strategy map.
|
void |
setNextFlowStrategy(com.google.common.base.Function<ProfileRequestContext,String> strategy)
Set a function to run directly instead of using a strategy map.
|
void |
setNextFlowStrategyMap(Map<String,Object> map)
Set the map of transition rules to follow.
|
@Nonnull @NonnullElements private Map<String,com.google.common.base.Function<ProfileRequestContext,String>> nextFlowStrategyMap
public MultiFactorAuthenticationTransition()
@Nonnull public com.google.common.base.Function<ProfileRequestContext,String> getNextFlowStrategy(@Nonnull@NotEmpty String event)
event - the event to transition from@Nonnull @NonnullElements @Live Map<String,com.google.common.base.Function<ProfileRequestContext,String>> getNextFlowStrategyMap()
public void setNextFlowStrategyMap(@Nonnull@NonnullElements Map<String,Object> map)
The values in the map must be either a String identifying the flow ID to run, or
a Function<ProfileRequestContext,String>
to execute.
map - map of transition rulespublic void setNextFlow(@Nullable@NotEmpty String flowId)
The transition rule is implicitly based on a "proceed" event occurring, and assumes no custom transitions for any other events.
flowId - fully-qualified flow ID to runpublic void setNextFlowStrategy(@Nonnull com.google.common.base.Function<ProfileRequestContext,String> strategy)
The transition rule is implicitly based on a "proceed" event occurring, and assumes no custom transitions for any other events.
strategy - function to runCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.