protected void createDuoUniversalPromptLoginViewState(final List<AbstractStateModel> states,
                                                          final DuoSecurityMultifactorAuthenticationProperties properties) {

        if (properties.getSessionStorageType().isTicketRegistry()) {
            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);
        } else {
            val actionState = new ActionStateModel(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);
            actionState.setActions(actions);
            val trans = new LinkedList<TransitionModel>();
            val transModel = new TransitionModel();
            transModel.setOn(CasWebflowConstants.TRANSITION_ID_SUCCESS);
            transModel.setTo(CasWebflowConstants.STATE_ID_BROWSER_STORAGE_WRITE);
            trans.add(transModel);
            actionState.setTransitions(trans);
            states.add(actionState);
        }
    }
This is {@link DuoSecurityMultifactorWebflowConfigurer}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-duo-core/src/main/java/org/apereo/cas/adaptors/duo/web/flow/DuoSecurityMultifactorWebflowConfigurer.java