Search in sources :

Example 36 with ActionState

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

the class AcceptableUsagePolicyWebflowConfigurer method createVerifyActionState.

private void createVerifyActionState(final Flow flow) {
    final ActionState actionState = createActionState(flow, STATE_ID_AUP_CHECK, createAcceptableUsagePolicyAction("verify"));
    final String target = getRealSubmissionState(flow).getTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS).getTargetStateId();
    actionState.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS, target));
    actionState.getTransitionSet().add(createTransition(AcceptableUsagePolicyFormAction.EVENT_ID_MUST_ACCEPT, ACCEPTABLE_USAGE_POLICY_VIEW));
}
Also used : ActionState(org.springframework.webflow.engine.ActionState)

Example 37 with ActionState

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

the class BasicAuthenticationWebflowConfigurer method doInitialize.

@Override
protected void doInitialize() {
    final Flow flow = getLoginFlow();
    if (flow != null) {
        final ActionState actionState = createActionState(flow, "basicAuthenticationCheck", createEvaluateAction("basicAuthenticationAction"));
        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 38 with ActionState

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

the class ConsentWebflowConfigurer method createConsentView.

private void createConsentView(final Flow flow) {
    final ViewState state = createViewState(flow, VIEW_ID_CONSENT_VIEW, VIEW_ID_CONSENT_VIEW);
    createTransitionForState(state, CasWebflowConstants.TRANSITION_ID_CONFIRM, STATE_ID_CONSENT_CONFIRM);
    createTransitionForState(state, CasWebflowConstants.TRANSITION_ID_CANCEL, CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM);
    final ActionState action = createActionState(flow, STATE_ID_CONSENT_CONFIRM, createEvaluateAction("confirmConsentAction"));
    createTransitionForState(action, CasWebflowConstants.TRANSITION_ID_SUCCESS, ACTION_GEN_SERVICE_TICKET_AFTER_CONSENT);
}
Also used : ViewState(org.springframework.webflow.engine.ViewState) ActionState(org.springframework.webflow.engine.ActionState)

Example 39 with ActionState

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

the class DefaultLoginWebflowConfigurer method createRedirectToServiceActionState.

/**
 * Create redirect to service action state.
 *
 * @param flow the flow
 */
protected void createRedirectToServiceActionState(final Flow flow) {
    final ActionState redirectToView = createActionState(flow, CasWebflowConstants.STATE_ID_REDIRECT, createEvaluateAction(CasWebflowConstants.ACTION_ID_REDIRECT_TO_SERVICE));
    createTransitionForState(redirectToView, Response.ResponseType.POST.name().toLowerCase(), CasWebflowConstants.STATE_ID_POST_VIEW);
    createTransitionForState(redirectToView, Response.ResponseType.HEADER.name().toLowerCase(), CasWebflowConstants.STATE_ID_HEADER_VIEW);
    createTransitionForState(redirectToView, Response.ResponseType.REDIRECT.name().toLowerCase(), CasWebflowConstants.STATE_ID_REDIR_VIEW);
}
Also used : ActionState(org.springframework.webflow.engine.ActionState)

Example 40 with ActionState

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

the class DefaultLoginWebflowConfigurer method createHandleAuthenticationFailureAction.

/**
 * Create handle authentication failure action.
 *
 * @param flow the flow
 */
protected void createHandleAuthenticationFailureAction(final Flow flow) {
    final ActionState handler = createActionState(flow, CasWebflowConstants.STATE_ID_HANDLE_AUTHN_FAILURE, createEvaluateAction(CasWebflowConstants.ACTION_ID_AUTHENTICATION_EXCEPTION_HANDLER));
    createTransitionForState(handler, AccountDisabledException.class.getSimpleName(), CasWebflowConstants.VIEW_ID_ACCOUNT_DISABLED);
    createTransitionForState(handler, AccountLockedException.class.getSimpleName(), CasWebflowConstants.VIEW_ID_ACCOUNT_LOCKED);
    createTransitionForState(handler, AccountPasswordMustChangeException.class.getSimpleName(), CasWebflowConstants.VIEW_ID_MUST_CHANGE_PASSWORD);
    createTransitionForState(handler, CredentialExpiredException.class.getSimpleName(), CasWebflowConstants.VIEW_ID_EXPIRED_PASSWORD);
    createTransitionForState(handler, InvalidLoginLocationException.class.getSimpleName(), CasWebflowConstants.VIEW_ID_INVALID_WORKSTATION);
    createTransitionForState(handler, InvalidLoginTimeException.class.getSimpleName(), CasWebflowConstants.VIEW_ID_INVALID_AUTHENTICATION_HOURS);
    createTransitionForState(handler, FailedLoginException.class.getSimpleName(), CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM);
    createTransitionForState(handler, AccountNotFoundException.class.getSimpleName(), CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM);
    createTransitionForState(handler, UnauthorizedServiceForPrincipalException.class.getSimpleName(), CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM);
    createTransitionForState(handler, PrincipalException.class.getSimpleName(), CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM);
    createTransitionForState(handler, UnsatisfiedAuthenticationPolicyException.class.getSimpleName(), CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM);
    createTransitionForState(handler, UnauthorizedAuthenticationException.class.getSimpleName(), CasWebflowConstants.VIEW_ID_AUTHENTICATION_BLOCKED);
    createTransitionForState(handler, CasWebflowConstants.STATE_ID_SERVICE_UNAUTHZ_CHECK, CasWebflowConstants.STATE_ID_SERVICE_UNAUTHZ_CHECK);
    createStateDefaultTransition(handler, CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM);
}
Also used : UnsatisfiedAuthenticationPolicyException(org.apereo.cas.ticket.UnsatisfiedAuthenticationPolicyException) AccountLockedException(javax.security.auth.login.AccountLockedException) UnauthorizedServiceForPrincipalException(org.apereo.cas.services.UnauthorizedServiceForPrincipalException) InvalidLoginLocationException(org.apereo.cas.authentication.exceptions.InvalidLoginLocationException) InvalidLoginTimeException(org.apereo.cas.authentication.exceptions.InvalidLoginTimeException) UnauthorizedAuthenticationException(org.apereo.cas.authentication.adaptive.UnauthorizedAuthenticationException) FailedLoginException(javax.security.auth.login.FailedLoginException) PrincipalException(org.apereo.cas.authentication.PrincipalException) UnauthorizedServiceForPrincipalException(org.apereo.cas.services.UnauthorizedServiceForPrincipalException) AccountPasswordMustChangeException(org.apereo.cas.authentication.exceptions.AccountPasswordMustChangeException) ActionState(org.springframework.webflow.engine.ActionState) CredentialExpiredException(javax.security.auth.login.CredentialExpiredException) AccountNotFoundException(javax.security.auth.login.AccountNotFoundException) AccountDisabledException(org.apereo.cas.authentication.exceptions.AccountDisabledException)

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