org.jasig.cas.web.flow.TokenWebflowConfigurer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cas-server-support-token-webflow Show documentation
Show all versions of cas-server-support-token-webflow Show documentation
cas-server-support-token-webflow
The newest version!
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 TokenWebflowConfigurer} is responsible for
* adjusting the CAS webflow context for token authentication support integration.
*
* @author Misagh Moayyed
* @since 4.2
*/
@Component("tokenWebflowConfigurer")
public class TokenWebflowConfigurer extends AbstractCasWebflowConfigurer {
@Override
protected void doInitialize() throws Exception {
final Flow flow = getLoginFlow();
final ActionState actionState = createActionState(flow, "tokenAuthenticationCheck",
createEvaluateAction("tokenAuthenticationAction"));
actionState.getTransitionSet().add(createTransition(TRANSITION_ID_SUCCESS, TRANSITION_ID_SEND_TICKET_GRANTING_TICKET));
createStateDefaultTransition(actionState, getStartState(flow).getId());
setStartState(flow, actionState);
}
}