use of org.springframework.webflow.engine.model.TransitionModel in project cas by apereo.
the class DuoSecurityMultifactorWebflowConfigurer method createDuoLoginViewState.
private static void createDuoLoginViewState(final List<AbstractStateModel> states) {
val viewState = new ViewStateModel(CasWebflowConstants.STATE_ID_VIEW_LOGIN_FORM_DUO);
viewState.setView("duo-security/casDuoLoginView");
viewState.setModel(CasWebflowConstants.VAR_ID_CREDENTIAL);
val bm = new BinderModel();
val bindings = new LinkedList<BindingModel>();
val bme = new BindingModel("signedDuoResponse", null, null);
bindings.add(bme);
bm.setBindings(bindings);
viewState.setBinder(bm);
val actions = new LinkedList<AbstractActionModel>();
actions.add(new EvaluateModel(CasWebflowConstants.ACTION_ID_PREPARE_DUO_WEB_LOGIN_FORM));
viewState.setOnEntryActions(actions);
val trans = new LinkedList<TransitionModel>();
val 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 createDuoAuthenticationWebflowAction.
private static void createDuoAuthenticationWebflowAction(final List<AbstractStateModel> states) {
val actModel = new ActionStateModel(CasWebflowConstants.STATE_ID_REAL_SUBMIT);
val actions = new LinkedList<AbstractActionModel>();
actions.add(new EvaluateModel(CasWebflowConstants.ACTION_ID_DUO_AUTHENTICATION_WEBFLOW));
actModel.setActions(actions);
val trans = new LinkedList<TransitionModel>();
var transModel = new TransitionModel();
transModel.setOn(CasWebflowConstants.TRANSITION_ID_SUCCESS);
transModel.setTo(CasWebflowConstants.STATE_ID_SUCCESS);
trans.add(transModel);
transModel = new TransitionModel();
transModel.setOn(CasWebflowConstants.TRANSITION_ID_ERROR);
transModel.setTo(CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM);
trans.add(transModel);
transModel = new TransitionModel();
transModel.setOn(CasWebflowConstants.TRANSITION_ID_DENY);
transModel.setTo(CasWebflowConstants.STATE_ID_MFA_DENIED);
trans.add(transModel);
transModel = new TransitionModel();
transModel.setOn(CasWebflowConstants.TRANSITION_ID_UNAVAILABLE);
transModel.setTo(CasWebflowConstants.STATE_ID_MFA_UNAVAILABLE);
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 createDuoDetermineUserAccountAction.
private static void createDuoDetermineUserAccountAction(final List<AbstractStateModel> states) {
val actModel = new ActionStateModel(CasWebflowConstants.STATE_ID_MFA_PRE_AUTH);
val actions = new LinkedList<AbstractActionModel>();
actions.add(new EvaluateModel(CasWebflowConstants.ACTION_ID_DETERMINE_DUO_USER_ACCOUNT));
actModel.setActions(actions);
val trans = new LinkedList<TransitionModel>();
var transModel = new TransitionModel();
transModel.setOn(CasWebflowConstants.TRANSITION_ID_SUCCESS);
transModel.setTo(CasWebflowConstants.STATE_ID_DETERMINE_DUO_REQUEST);
trans.add(transModel);
transModel = new TransitionModel();
transModel.setOn(CasWebflowConstants.TRANSITION_ID_ENROLL);
transModel.setTo(VIEW_ID_REDIRECT_TO_DUO_REGISTRATION);
trans.add(transModel);
transModel = new TransitionModel();
transModel.setOn(CasWebflowConstants.TRANSITION_ID_BYPASS);
transModel.setTo(CasWebflowConstants.STATE_ID_MFA_CHECK_BYPASS);
trans.add(transModel);
transModel = new TransitionModel();
transModel.setOn(CasWebflowConstants.TRANSITION_ID_UNAVAILABLE);
transModel.setTo(CasWebflowConstants.STATE_ID_MFA_FAILURE);
trans.add(transModel);
transModel = new TransitionModel();
transModel.setOn(CasWebflowConstants.TRANSITION_ID_DENY);
transModel.setTo(CasWebflowConstants.STATE_ID_MFA_DENIED);
trans.add(transModel);
transModel = new TransitionModel();
transModel.setOn(CasWebflowConstants.TRANSITION_ID_ERROR);
transModel.setTo(CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM);
trans.add(transModel);
actModel.setTransitions(trans);
states.add(actModel);
}
use of org.springframework.webflow.engine.model.TransitionModel in project cas by apereo.
the class DuoMultifactorWebflowConfigurer method createDuoFinalizeAuthenticationAction.
private void createDuoFinalizeAuthenticationAction(final List<AbstractStateModel> states) {
final ActionStateModel actModel = new ActionStateModel("finalizeAuthentication");
final LinkedList<AbstractActionModel> actions = new LinkedList<>();
actions.add(new EvaluateModel("duoAuthenticationWebflowAction"));
actModel.setActions(actions);
final LinkedList<TransitionModel> trans = new LinkedList<>();
final TransitionModel transModel = new TransitionModel();
transModel.setOn(CasWebflowConstants.TRANSITION_ID_SUCCESS);
transModel.setTo(CasWebflowConstants.TRANSITION_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 DuoMultifactorWebflowConfigurer method createDuoDetermineUserAccountAction.
private void createDuoDetermineUserAccountAction(final List<AbstractStateModel> states) {
final ActionStateModel actModel = new ActionStateModel("determineDuoUserAccount");
final LinkedList<AbstractActionModel> actions = new LinkedList<>();
actions.add(new EvaluateModel("determineDuoUserAccountAction"));
actModel.setActions(actions);
final LinkedList<TransitionModel> trans = new LinkedList<>();
TransitionModel transModel = new TransitionModel();
transModel.setOn(CasWebflowConstants.TRANSITION_ID_SUCCESS);
transModel.setTo("determineDuoRequest");
trans.add(transModel);
transModel = new TransitionModel();
transModel.setOn(CasWebflowConstants.TRANSITION_ID_ENROLL);
transModel.setTo("redirectToDuoRegistration");
trans.add(transModel);
actModel.setTransitions(trans);
states.add(actModel);
}
Aggregations