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

org.apereo.cas.web.flow.RiskAuthenticationVerificationWebflowConfigurer Maven / Gradle / Ivy

The newest version!
package org.apereo.cas.web.flow;

import org.apereo.cas.configuration.CasConfigurationProperties;
import org.apereo.cas.web.flow.configurer.AbstractCasWebflowConfigurer;
import lombok.val;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.webflow.definition.registry.FlowDefinitionRegistry;
import org.springframework.webflow.engine.builder.support.FlowBuilderServices;

/**
 * This is {@link RiskAuthenticationVerificationWebflowConfigurer}.
 *
 * @author Misagh Moayyed
 * @since 7.0.0
 */
public class RiskAuthenticationVerificationWebflowConfigurer extends AbstractCasWebflowConfigurer {

    public RiskAuthenticationVerificationWebflowConfigurer(final FlowBuilderServices flowBuilderServices,
                                                           final FlowDefinitionRegistry mainFlowDefinitionRegistry,
                                                           final ConfigurableApplicationContext applicationContext,
                                                           final CasConfigurationProperties casProperties) {
        super(flowBuilderServices, mainFlowDefinitionRegistry, applicationContext, casProperties);
    }

    @Override
    protected void doInitialize() {
        val riskVerificationFlow = buildFlow(CasWebflowConfigurer.FLOW_ID_RISK_VERIFICATION);
        val checkRiskTokenState = createActionState(riskVerificationFlow, CasWebflowConstants.STATE_ID_RISK_AUTHENTICATION_TOKEN_CHECK,
            CasWebflowConstants.ACTION_ID_RISK_AUTHENTICATION_TOKEN_CHECK);
        val confirmationView = createEndState(riskVerificationFlow, "riskVerificationConfirmationView", "adaptive-authn/casRiskAuthenticationVerifiedView");
        createStateDefaultTransition(checkRiskTokenState, confirmationView.getId());
        riskVerificationFlow.setStartState(checkRiskTokenState);
        mainFlowDefinitionRegistry.registerFlowDefinition(riskVerificationFlow);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy