Search in sources :

Example 1 with TransitionModel

use of org.springframework.webflow.engine.model.TransitionModel in project cas by apereo.

the class DuoMultifactorWebflowConfigurer method createDuoAuthenticationWebflowAction.

private void createDuoAuthenticationWebflowAction(final List<AbstractStateModel> states) {
    final ActionStateModel actModel = new ActionStateModel(CasWebflowConstants.STATE_ID_REAL_SUBMIT);
    final LinkedList<AbstractActionModel> actions = new LinkedList<>();
    actions.add(new EvaluateModel("duoAuthenticationWebflowAction"));
    actModel.setActions(actions);
    final LinkedList<TransitionModel> trans = new LinkedList<>();
    TransitionModel transModel = new TransitionModel();
    transModel.setOn(CasWebflowConstants.TRANSITION_ID_SUCCESS);
    transModel.setTo(CasWebflowConstants.TRANSITION_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);
    actModel.setTransitions(trans);
    states.add(actModel);
}
Also used : ActionStateModel(org.springframework.webflow.engine.model.ActionStateModel) TransitionModel(org.springframework.webflow.engine.model.TransitionModel) AbstractActionModel(org.springframework.webflow.engine.model.AbstractActionModel) EvaluateModel(org.springframework.webflow.engine.model.EvaluateModel) LinkedList(java.util.LinkedList)

Example 2 with TransitionModel

use of org.springframework.webflow.engine.model.TransitionModel in project cas by apereo.

the class DuoMultifactorWebflowConfigurer method createDuoDoNonWebAuthenticationAction.

private void createDuoDoNonWebAuthenticationAction(final List<AbstractStateModel> states) {
    final ActionStateModel actModel = new ActionStateModel("doNonWebAuthentication");
    final LinkedList<AbstractActionModel> actions = new LinkedList<>();
    actions.add(new EvaluateModel("duoNonWebAuthenticationAction"));
    actModel.setActions(actions);
    final LinkedList<TransitionModel> trans = new LinkedList<>();
    final TransitionModel transModel = new TransitionModel();
    transModel.setOn(CasWebflowConstants.TRANSITION_ID_SUCCESS);
    transModel.setTo("finalizeAuthentication");
    trans.add(transModel);
    actModel.setTransitions(trans);
    states.add(actModel);
}
Also used : ActionStateModel(org.springframework.webflow.engine.model.ActionStateModel) TransitionModel(org.springframework.webflow.engine.model.TransitionModel) AbstractActionModel(org.springframework.webflow.engine.model.AbstractActionModel) EvaluateModel(org.springframework.webflow.engine.model.EvaluateModel) LinkedList(java.util.LinkedList)

Example 3 with TransitionModel

use of org.springframework.webflow.engine.model.TransitionModel in project cas by apereo.

the class DuoMultifactorWebflowConfigurer method createDuoInitializeLoginAction.

private LinkedList<AbstractActionModel> createDuoInitializeLoginAction(final List<AbstractStateModel> states) {
    final ActionStateModel actModel = new ActionStateModel(CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM);
    final LinkedList<AbstractActionModel> actions = new LinkedList<>();
    actions.add(new EvaluateModel("initializeLoginAction"));
    actModel.setActions(actions);
    final LinkedList<TransitionModel> trans = new LinkedList<>();
    final TransitionModel transModel = new TransitionModel();
    transModel.setOn(CasWebflowConstants.TRANSITION_ID_SUCCESS);
    transModel.setTo("determineDuoUserAccount");
    trans.add(transModel);
    actModel.setTransitions(trans);
    states.add(actModel);
    return actions;
}
Also used : ActionStateModel(org.springframework.webflow.engine.model.ActionStateModel) TransitionModel(org.springframework.webflow.engine.model.TransitionModel) AbstractActionModel(org.springframework.webflow.engine.model.AbstractActionModel) EvaluateModel(org.springframework.webflow.engine.model.EvaluateModel) LinkedList(java.util.LinkedList)

Example 4 with TransitionModel

use of org.springframework.webflow.engine.model.TransitionModel in project cas by apereo.

the class DuoMultifactorWebflowConfigurer method createDuoDetermineRequestAction.

private void createDuoDetermineRequestAction(final List<AbstractStateModel> states) {
    final ActionStateModel actModel = new ActionStateModel("determineDuoRequest");
    final LinkedList<AbstractActionModel> actions = new LinkedList<>();
    actions.add(new EvaluateModel("checkWebAuthenticationRequestAction"));
    actModel.setActions(actions);
    final LinkedList<TransitionModel> trans = new LinkedList<>();
    TransitionModel transModel = new TransitionModel();
    transModel.setOn(CasWebflowConstants.TRANSITION_ID_YES);
    transModel.setTo(STATE_ID_VIEW_LOGIN_FORM_DUO);
    trans.add(transModel);
    transModel = new TransitionModel();
    transModel.setOn(CasWebflowConstants.TRANSITION_ID_NO);
    transModel.setTo("doNonWebAuthentication");
    trans.add(transModel);
    actModel.setTransitions(trans);
    states.add(actModel);
}
Also used : ActionStateModel(org.springframework.webflow.engine.model.ActionStateModel) TransitionModel(org.springframework.webflow.engine.model.TransitionModel) AbstractActionModel(org.springframework.webflow.engine.model.AbstractActionModel) EvaluateModel(org.springframework.webflow.engine.model.EvaluateModel) LinkedList(java.util.LinkedList)

Example 5 with TransitionModel

use of org.springframework.webflow.engine.model.TransitionModel in project cas by apereo.

the class DuoSecurityMultifactorWebflowConfigurer method createDuoDetermineRequestAction.

private static void createDuoDetermineRequestAction(final List<AbstractStateModel> states) {
    val actModel = new ActionStateModel(CasWebflowConstants.STATE_ID_DETERMINE_DUO_REQUEST);
    val actions = new LinkedList<AbstractActionModel>();
    actions.add(new EvaluateModel(CasWebflowConstants.ACTION_ID_CHECK_WEB_AUTHENTICATION_REQUEST));
    actModel.setActions(actions);
    val trans = new LinkedList<TransitionModel>();
    var transModel = new TransitionModel();
    transModel.setOn(CasWebflowConstants.TRANSITION_ID_YES);
    transModel.setTo(CasWebflowConstants.STATE_ID_VIEW_LOGIN_FORM_DUO);
    trans.add(transModel);
    transModel = new TransitionModel();
    transModel.setOn(CasWebflowConstants.TRANSITION_ID_NO);
    transModel.setTo(CasWebflowConstants.STATE_ID_DUO_NON_WEB_AUTHENTICATION);
    trans.add(transModel);
    actModel.setTransitions(trans);
    states.add(actModel);
}
Also used : lombok.val(lombok.val) ActionStateModel(org.springframework.webflow.engine.model.ActionStateModel) TransitionModel(org.springframework.webflow.engine.model.TransitionModel) EvaluateModel(org.springframework.webflow.engine.model.EvaluateModel) LinkedList(java.util.LinkedList)

Aggregations

LinkedList (java.util.LinkedList)14 EvaluateModel (org.springframework.webflow.engine.model.EvaluateModel)14 TransitionModel (org.springframework.webflow.engine.model.TransitionModel)14 ActionStateModel (org.springframework.webflow.engine.model.ActionStateModel)12 lombok.val (lombok.val)7 AbstractActionModel (org.springframework.webflow.engine.model.AbstractActionModel)7 BinderModel (org.springframework.webflow.engine.model.BinderModel)2 BindingModel (org.springframework.webflow.engine.model.BindingModel)2 ViewStateModel (org.springframework.webflow.engine.model.ViewStateModel)2