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