All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jasig.cas.web.flow.Pac4jWebflowConfigurer Maven / Gradle / Ivy

package org.jasig.cas.web.flow;

import org.springframework.stereotype.Component;
import org.springframework.webflow.engine.ActionState;
import org.springframework.webflow.engine.Flow;

/**
 * The {@link Pac4jWebflowConfigurer} is responsible for
 * adjusting the CAS webflow context for pac4j integration.
 *
 * @author Misagh Moayyed
 * @since 4.2
 */
@Component("pac4jWebflowConfigurer")
public class Pac4jWebflowConfigurer extends AbstractCasWebflowConfigurer {

    @Override
    protected void doInitialize() throws Exception {
        final Flow flow = getLoginFlow();
        final ActionState actionState = createActionState(flow, "clientAction", createEvaluateAction("clientAction"));
        actionState.getTransitionSet().add(createTransition(TRANSITION_ID_SUCCESS, TRANSITION_ID_SEND_TICKET_GRANTING_TICKET));
        actionState.getTransitionSet().add(createTransition(TRANSITION_ID_ERROR, getStartState(flow).getId()));
        actionState.getTransitionSet().add(createTransition("stop", "stopWebflow"));
        setStartState(flow, actionState);
        createViewState(flow, "stopWebflow", "stopWebflow");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy