use of org.springframework.webflow.engine.model.TransitionModel in project cas by apereo.
the class DuoMultifactorWebflowConfigurer method createDuoLoginViewState.
private void createDuoLoginViewState(final List<AbstractStateModel> states) {
final ViewStateModel viewState = new ViewStateModel(STATE_ID_VIEW_LOGIN_FORM_DUO);
viewState.setView("casDuoLoginView");
viewState.setModel(CasWebflowConstants.VAR_ID_CREDENTIAL);
final BinderModel bm = new BinderModel();
final LinkedList<BindingModel> bindings = new LinkedList<>();
final BindingModel bme = new BindingModel("signedDuoResponse", null, null);
bindings.add(bme);
bm.setBindings(bindings);
viewState.setBinder(bm);
final LinkedList<AbstractActionModel> actions = new LinkedList<>();
actions.add(new EvaluateModel("prepareDuoWebLoginFormAction"));
viewState.setOnEntryActions(actions);
final LinkedList<TransitionModel> trans = new LinkedList<>();
final TransitionModel transModel = new TransitionModel();
transModel.setOn(CasWebflowConstants.TRANSITION_ID_SUBMIT);
transModel.setTo(CasWebflowConstants.STATE_ID_REAL_SUBMIT);
transModel.setBind(Boolean.TRUE.toString());
transModel.setValidate(Boolean.FALSE.toString());
trans.add(transModel);
viewState.setTransitions(trans);
states.add(viewState);
}
use of org.springframework.webflow.engine.model.TransitionModel in project cas by apereo.
the class DuoSecurityMultifactorWebflowConfigurer method createDuoFinalizeAuthenticationAction.
private static void createDuoFinalizeAuthenticationAction(final List<AbstractStateModel> states) {
val actModel = new ActionStateModel(CasWebflowConstants.STATE_ID_FINALIZE_AUTHENTICATION);
val actions = new LinkedList<AbstractActionModel>();
actions.add(new EvaluateModel(CasWebflowConstants.ACTION_ID_DUO_AUTHENTICATION_WEBFLOW));
actModel.setActions(actions);
val trans = new LinkedList<TransitionModel>();
val transModel = new TransitionModel();
transModel.setOn(CasWebflowConstants.TRANSITION_ID_SUCCESS);
transModel.setTo(CasWebflowConstants.STATE_ID_SUCCESS);
trans.add(transModel);
actModel.setTransitions(trans);
states.add(actModel);
}
use of org.springframework.webflow.engine.model.TransitionModel in project cas by apereo.
the class DuoSecurityMultifactorWebflowConfigurer method createDuoInitializeLoginAction.
private static LinkedList<AbstractActionModel> createDuoInitializeLoginAction(final List<AbstractStateModel> states) {
val actModel = new ActionStateModel(CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM);
val actions = new LinkedList<AbstractActionModel>();
actions.add(new EvaluateModel(CasWebflowConstants.ACTION_ID_INIT_LOGIN_ACTION));
actModel.setActions(actions);
val trans = new LinkedList<TransitionModel>();
val transModel = new TransitionModel();
transModel.setOn(CasWebflowConstants.TRANSITION_ID_SUCCESS);
transModel.setTo(CasWebflowConstants.STATE_ID_DETERMINE_DUO_USER_ACCOUNT);
trans.add(transModel);
actModel.setTransitions(trans);
states.add(actModel);
return actions;
}
use of org.springframework.webflow.engine.model.TransitionModel in project cas by apereo.
the class DuoSecurityMultifactorWebflowConfigurer method createDuoDoNonWebAuthenticationAction.
private static void createDuoDoNonWebAuthenticationAction(final List<AbstractStateModel> states) {
val actModel = new ActionStateModel(CasWebflowConstants.STATE_ID_DUO_NON_WEB_AUTHENTICATION);
val actions = new LinkedList<AbstractActionModel>();
actions.add(new EvaluateModel(CasWebflowConstants.ACTION_ID_DUO_NON_WEB_AUTHENTICATION));
actModel.setActions(actions);
val trans = new LinkedList<TransitionModel>();
val transModel = new TransitionModel();
transModel.setOn(CasWebflowConstants.TRANSITION_ID_SUCCESS);
transModel.setTo(CasWebflowConstants.STATE_ID_FINALIZE_AUTHENTICATION);
trans.add(transModel);
actModel.setTransitions(trans);
states.add(actModel);
}
Aggregations