use of org.springframework.webflow.engine.model.ViewStateModel in project cas by apereo.
the class DuoSecurityMultifactorWebflowConfigurer method createDuoRedirectToRegistrationAction.
private static void createDuoRedirectToRegistrationAction(final List<AbstractStateModel> states) {
val endModel = new ViewStateModel(VIEW_ID_REDIRECT_TO_DUO_REGISTRATION);
endModel.setView("externalRedirect:#{flowScope.duoRegistrationUrl}");
states.add(endModel);
}
use of org.springframework.webflow.engine.model.ViewStateModel 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.ViewStateModel in project cas by apereo.
the class DuoMultifactorWebflowConfigurer method createDuoRedirectToRegistrationAction.
private void createDuoRedirectToRegistrationAction(final List<AbstractStateModel> states) {
final ViewStateModel endModel = new ViewStateModel("redirectToDuoRegistration");
endModel.setView("externalRedirect:#{flowScope.duoRegistrationUrl}");
states.add(endModel);
}
use of org.springframework.webflow.engine.model.ViewStateModel 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.ViewStateModel in project cas by apereo.
the class DuoSecurityMultifactorWebflowConfigurer method createDuoUniversalPromptLoginViewState.
private static void createDuoUniversalPromptLoginViewState(final ArrayList<AbstractStateModel> states) {
val viewState = new ViewStateModel(CasWebflowConstants.STATE_ID_VIEW_LOGIN_FORM_DUO);
val actions = new LinkedList<AbstractActionModel>();
val action = new EvaluateModel(CasWebflowConstants.ACTION_ID_DUO_UNIVERSAL_PROMPT_PREPARE_LOGIN);
actions.add(action);
viewState.setOnEntryActions(actions);
viewState.setView("externalRedirect:#{flowScope.duoUniversalPromptLoginUrl}");
states.add(viewState);
}
Aggregations