use of org.springframework.webflow.engine.SubflowAttributeMapper in project cas by apereo.
the class AbstractCasWebflowConfigurer method registerMultifactorProviderAuthenticationWebflow.
/**
* Register multifactor provider authentication webflow.
*
* @param flow the flow
* @param subflowId the subflow id
* @param registry the registry
*/
protected void registerMultifactorProviderAuthenticationWebflow(final Flow flow, final String subflowId, final FlowDefinitionRegistry registry) {
final SubflowState subflowState = createSubflowState(flow, subflowId, subflowId);
final ActionState actionState = (ActionState) flow.getState(CasWebflowConstants.TRANSITION_ID_REAL_SUBMIT);
final String targetStateId = actionState.getTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS).getTargetStateId();
final List<DefaultMapping> mappings = new ArrayList<>();
final Mapper inputMapper = createMapperToSubflowState(mappings);
final SubflowAttributeMapper subflowMapper = createSubflowAttributeMapper(inputMapper, null);
subflowState.setAttributeMapper(subflowMapper);
subflowState.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS, targetStateId));
LOGGER.debug("Retrieved action state [{}]", actionState.getId());
createTransitionForState(actionState, subflowId, subflowId);
registerFlowDefinitionIntoLoginFlowRegistry(registry);
final TransitionableState state = flow.getTransitionableState(CasWebflowConstants.TRANSITION_ID_INITIAL_AUTHN_REQUEST_VALIDATION_CHECK);
createTransitionForState(state, subflowId, subflowId);
}
Aggregations