Search in sources :

Example 26 with ActionState

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

the class AcceptableUsagePolicyWebflowConfigurer method createTransitionStateToAcceptableUsagePolicy.

private void createTransitionStateToAcceptableUsagePolicy(final Flow flow) {
    final ActionState submit = getRealSubmissionState(flow);
    createTransitionForState(submit, CasWebflowConstants.TRANSITION_ID_SUCCESS, STATE_ID_AUP_CHECK, true);
}
Also used : ActionState(org.springframework.webflow.engine.ActionState)

Example 27 with ActionState

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

the class CasCaptchaWebflowConfigurer method createValidateRecaptchaAction.

private void createValidateRecaptchaAction(final Flow flow) {
    final ActionState state = getState(flow, CasWebflowConstants.STATE_ID_REAL_SUBMIT, ActionState.class);
    final List<Action> currentActions = new ArrayList<>();
    state.getActionList().forEach(currentActions::add);
    currentActions.forEach(a -> state.getActionList().remove(a));
    state.getActionList().add(createEvaluateAction("validateCaptchaAction"));
    currentActions.forEach(a -> state.getActionList().add(a));
    state.getTransitionSet().add(createTransition("captchaError", CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM));
}
Also used : Action(org.springframework.webflow.execution.Action) ArrayList(java.util.ArrayList) ActionState(org.springframework.webflow.engine.ActionState)

Example 28 with ActionState

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

the class ConsentWebflowConfigurer method createConsentTransitions.

private void createConsentTransitions(final Flow flow) {
    final ActionState sendTicket = getState(flow, CasWebflowConstants.STATE_ID_GENERATE_SERVICE_TICKET, ActionState.class);
    createTransitionForState(sendTicket, CheckConsentRequiredAction.EVENT_ID_CONSENT_REQUIRED, VIEW_ID_CONSENT_VIEW);
}
Also used : ActionState(org.springframework.webflow.engine.ActionState)

Example 29 with ActionState

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

the class GraphicalUserAuthenticationWebflowConfigurer method doInitialize.

@Override
protected void doInitialize() {
    final Flow flow = getLoginFlow();
    if (flow != null) {
        final ActionState state = getState(flow, CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM, ActionState.class);
        final Transition transition = (Transition) state.getTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS);
        final String targetStateId = transition.getTargetStateId();
        createTransitionForState(state, TRANSITION_ID_GUA_GET_USERID, STATE_ID_GUA_GET_USERID);
        final ViewState viewState = createViewState(flow, STATE_ID_GUA_GET_USERID, "casGuaGetUserIdView");
        createTransitionForState(viewState, CasWebflowConstants.TRANSITION_ID_SUBMIT, STATE_ID_GUA_DISPLAY_USER_GFX);
        final ViewState viewStateGfx = createViewState(flow, STATE_ID_GUA_DISPLAY_USER_GFX, "casGuaDisplayUserGraphicsView");
        viewStateGfx.getRenderActionList().add(createEvaluateAction("displayUserGraphicsBeforeAuthenticationAction"));
        createTransitionForState(viewStateGfx, CasWebflowConstants.TRANSITION_ID_SUBMIT, STATE_ID_ACCEPT_GUA);
        final ActionState acceptState = createActionState(flow, STATE_ID_ACCEPT_GUA, createEvaluateAction("acceptUserGraphicsForAuthenticationAction"));
        createStateDefaultTransition(acceptState, targetStateId);
    }
}
Also used : Transition(org.springframework.webflow.engine.Transition) ViewState(org.springframework.webflow.engine.ViewState) ActionState(org.springframework.webflow.engine.ActionState) Flow(org.springframework.webflow.engine.Flow)

Example 30 with ActionState

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

the class SpengoWebflowConfigurer method createStartSpnegoAction.

private void createStartSpnegoAction(final Flow flow) {
    final ActionState actionState = createActionState(flow, START_SPNEGO_AUTHENTICATE, createEvaluateAction(SPNEGO_NEGOTIATE));
    actionState.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS, SPNEGO));
    actionState.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_ERROR, CasWebflowConstants.STATE_ID_VIEW_LOGIN_FORM));
}
Also used : ActionState(org.springframework.webflow.engine.ActionState)

Aggregations

ActionState (org.springframework.webflow.engine.ActionState)59 Flow (org.springframework.webflow.engine.Flow)17 ViewState (org.springframework.webflow.engine.ViewState)12 Transition (org.springframework.webflow.engine.Transition)6 Action (org.springframework.webflow.execution.Action)4 ArrayList (java.util.ArrayList)2 EvaluateAction (org.springframework.webflow.action.EvaluateAction)2 SubflowState (org.springframework.webflow.engine.SubflowState)2 BinderConfiguration (org.springframework.webflow.engine.builder.BinderConfiguration)2 DefaultTargetStateResolver (org.springframework.webflow.engine.support.DefaultTargetStateResolver)2 AccountLockedException (javax.security.auth.login.AccountLockedException)1 AccountNotFoundException (javax.security.auth.login.AccountNotFoundException)1 CredentialExpiredException (javax.security.auth.login.CredentialExpiredException)1 FailedLoginException (javax.security.auth.login.FailedLoginException)1 PrincipalException (org.apereo.cas.authentication.PrincipalException)1 UnauthorizedAuthenticationException (org.apereo.cas.authentication.adaptive.UnauthorizedAuthenticationException)1 AccountDisabledException (org.apereo.cas.authentication.exceptions.AccountDisabledException)1 AccountPasswordMustChangeException (org.apereo.cas.authentication.exceptions.AccountPasswordMustChangeException)1 InvalidLoginLocationException (org.apereo.cas.authentication.exceptions.InvalidLoginLocationException)1 InvalidLoginTimeException (org.apereo.cas.authentication.exceptions.InvalidLoginTimeException)1