Search in sources :

Example 46 with ActionState

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

the class DefaultLogoutWebflowConfigurer method createTerminateSessionActionState.

/**
 * Create terminate session action state.
 *
 * @param flow the flow
 * @return the action state
 */
protected ActionState createTerminateSessionActionState(final Flow flow) {
    final ActionState actionState = createActionState(flow, CasWebflowConstants.STATE_ID_TERMINATE_SESSION, createEvaluateAction(CasWebflowConstants.ACTION_ID_TERMINATE_SESSION));
    createTransitionForState(actionState, CasWebflowConstants.TRANSITION_ID_WARN, CasWebflowConstants.STATE_ID_CONFIRM_LOGOUT_VIEW);
    createStateDefaultTransition(actionState, CasWebflowConstants.STATE_ID_DO_LOGOUT);
    return actionState;
}
Also used : ActionState(org.springframework.webflow.engine.ActionState)

Example 47 with ActionState

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

the class OpenIdWebflowConfigurer method doInitialize.

@Override
protected void doInitialize() {
    final Flow flow = getLoginFlow();
    if (flow != null) {
        final String condition = getOpenIdModeCondition();
        final DecisionState decisionState = createDecisionState(flow, "selectFirstAction", condition, OPEN_ID_SINGLE_SIGN_ON_ACTION, getStartState(flow).getId());
        final ActionState actionState = createActionState(flow, OPEN_ID_SINGLE_SIGN_ON_ACTION, createEvaluateAction(OPEN_ID_SINGLE_SIGN_ON_ACTION));
        actionState.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS, CasWebflowConstants.STATE_ID_SEND_TICKET_GRANTING_TICKET));
        actionState.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_ERROR, getStartState(flow).getId()));
        actionState.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_WARN, CasWebflowConstants.TRANSITION_ID_WARN));
        actionState.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_AUTHENTICATION_FAILURE, CasWebflowConstants.STATE_ID_VIEW_LOGIN_FORM));
        actionState.getExitActionList().add(createEvaluateAction(CasWebflowConstants.ACTION_ID_CLEAR_WEBFLOW_CREDENTIALS));
        registerMultifactorProvidersStateTransitionsIntoWebflow(actionState);
        setStartState(flow, decisionState);
    }
}
Also used : DecisionState(org.springframework.webflow.engine.DecisionState) ActionState(org.springframework.webflow.engine.ActionState) Flow(org.springframework.webflow.engine.Flow)

Example 48 with ActionState

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

the class DigestAuthenticationWebflowConfigurer method doInitialize.

@Override
protected void doInitialize() {
    final Flow flow = getLoginFlow();
    if (flow != null) {
        final ActionState actionState = createActionState(flow, "digestAuthenticationCheck", createEvaluateAction("digestAuthenticationAction"));
        actionState.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS, CasWebflowConstants.STATE_ID_SEND_TICKET_GRANTING_TICKET));
        actionState.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_WARN, CasWebflowConstants.TRANSITION_ID_WARN));
        actionState.getExitActionList().add(createEvaluateAction(CasWebflowConstants.ACTION_ID_CLEAR_WEBFLOW_CREDENTIALS));
        registerMultifactorProvidersStateTransitionsIntoWebflow(actionState);
        createStateDefaultTransition(actionState, getStartState(flow).getId());
        setStartState(flow, actionState);
    }
}
Also used : ActionState(org.springframework.webflow.engine.ActionState) Flow(org.springframework.webflow.engine.Flow)

Example 49 with ActionState

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

the class RiskAwareAuthenticationWebflowConfigurer method doInitialize.

@Override
protected void doInitialize() {
    final Flow flow = getLoginFlow();
    if (flow != null) {
        final ActionState submit = getState(flow, CasWebflowConstants.STATE_ID_REAL_SUBMIT, ActionState.class);
        createTransitionForState(submit, BlockAuthenticationContingencyPlan.EVENT_ID_BLOCK_AUTHN, VIEW_ID_BLOCKED_AUTHN);
        createViewState(flow, VIEW_ID_BLOCKED_AUTHN, VIEW_ID_BLOCKED_AUTHN);
    }
}
Also used : ActionState(org.springframework.webflow.engine.ActionState) Flow(org.springframework.webflow.engine.Flow)

Example 50 with ActionState

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

the class InterruptWebflowConfigurer method createInterruptView.

private void createInterruptView(final Flow flow) {
    final ViewState viewState = createViewState(flow, VIEW_ID_INTERRUPT_VIEW, INTERRUPT_VIEW_ID);
    viewState.getEntryActionList().add(createEvaluateAction(STATE_ID_PREPARE_INTERRUPT_VIEW_ACTION));
    createStateDefaultTransition(viewState, STATE_ID_FINALIZE_INTERRUPT_ACTION);
    final String target = getRealSubmissionState(flow).getTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS).getTargetStateId();
    final ActionState finalizeInterrupt = createActionState(flow, STATE_ID_FINALIZE_INTERRUPT_ACTION, createEvaluateAction(STATE_ID_FINALIZE_INTERRUPT_ACTION));
    createTransitionForState(finalizeInterrupt, CasWebflowConstants.TRANSITION_ID_SUCCESS, target);
    createTransitionForState(finalizeInterrupt, CasWebflowConstants.TRANSITION_ID_NO, "finishedInterrupt");
    createEndState(flow, "finishedInterrupt");
}
Also used : ViewState(org.springframework.webflow.engine.ViewState) 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