Search in sources :

Example 31 with ActionState

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

the class SpengoWebflowConfigurer method createEvaluateSpnegoClientAction.

private void createEvaluateSpnegoClientAction(final Flow flow) {
    final ActionState evaluateClientRequest = createActionState(flow, EVALUATE_SPNEGO_CLIENT, createEvaluateAction(casProperties.getAuthn().getSpnego().getHostNameClientActionStrategy()));
    evaluateClientRequest.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_YES, START_SPNEGO_AUTHENTICATE));
    evaluateClientRequest.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_NO, getStartState(flow)));
}
Also used : ActionState(org.springframework.webflow.engine.ActionState)

Example 32 with ActionState

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

the class PasswordManagementWebflowConfigurer method configure.

private void configure(final Flow flow, final String id) {
    createFlowVariable(flow, FLOW_VAR_ID_PASSWORD, PasswordChangeBean.class);
    final BinderConfiguration binder = createStateBinderConfiguration(Arrays.asList(FLOW_VAR_ID_PASSWORD, "confirmedPassword"));
    final ViewState viewState = createViewState(flow, id, id, binder);
    createStateModelBinding(viewState, FLOW_VAR_ID_PASSWORD, PasswordChangeBean.class);
    viewState.getEntryActionList().add(this.passwordChangeAction);
    final Transition transition = createTransitionForState(viewState, CasWebflowConstants.TRANSITION_ID_SUBMIT, PASSWORD_CHANGE_ACTION);
    transition.getAttributes().put("bind", Boolean.TRUE);
    transition.getAttributes().put("validate", Boolean.TRUE);
    createStateDefaultTransition(viewState, id);
    final ActionState pswChangeAction = createActionState(flow, PASSWORD_CHANGE_ACTION, createEvaluateAction(PASSWORD_CHANGE_ACTION));
    pswChangeAction.getTransitionSet().add(createTransition(PasswordChangeAction.PASSWORD_UPDATE_SUCCESS, "casPasswordUpdateSuccess"));
    pswChangeAction.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_ERROR, id));
}
Also used : Transition(org.springframework.webflow.engine.Transition) ViewState(org.springframework.webflow.engine.ViewState) ActionState(org.springframework.webflow.engine.ActionState) BinderConfiguration(org.springframework.webflow.engine.builder.BinderConfiguration)

Example 33 with ActionState

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

the class DefaultWebflowConfigurer method createServiceAuthorizationCheckAction.

private void createServiceAuthorizationCheckAction(final Flow flow) {
    final ActionState serviceAuthorizationCheck = createActionState(flow, CasWebflowConstants.STATE_ID_SERVICE_AUTHZ_CHECK, createEvaluateAction("serviceAuthorizationCheck"));
    createStateDefaultTransition(serviceAuthorizationCheck, CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM);
}
Also used : ActionState(org.springframework.webflow.engine.ActionState)

Example 34 with ActionState

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

the class DefaultWebflowConfigurer method createTerminateSessionAction.

private void createTerminateSessionAction(final Flow flow) {
    final ActionState terminateSession = createActionState(flow, CasWebflowConstants.STATE_ID_TERMINATE_SESSION, createEvaluateAction("terminateSessionAction"));
    createStateDefaultTransition(terminateSession, CasWebflowConstants.STATE_ID_GATEWAY_REQUEST_CHECK);
}
Also used : ActionState(org.springframework.webflow.engine.ActionState)

Example 35 with ActionState

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

the class DefaultWebflowConfigurer method createRedirectToServiceActionState.

private void createRedirectToServiceActionState(final Flow flow) {
    final ActionState redirectToView = createActionState(flow, CasWebflowConstants.STATE_ID_REDIRECT, createEvaluateAction("redirectToServiceAction"));
    createTransitionForState(redirectToView, Response.ResponseType.POST.name().toLowerCase(), CasWebflowConstants.STATE_ID_POST_VIEW);
    createTransitionForState(redirectToView, Response.ResponseType.REDIRECT.name().toLowerCase(), CasWebflowConstants.STATE_ID_REDIR_VIEW);
}
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