protected Event handleDuoSecurityUniversalPromptResponse(final RequestContext requestContext) throws Throwable {
        val duoState = WebUtils.getRequestParameterOrAttribute(requestContext, REQUEST_PARAMETER_STATE).orElseThrow();
        LOGGER.trace("Received Duo Security state [{}]", duoState);

        val resultingEvent = processStateFromTicketRegistry(requestContext, duoState);
        if (resultingEvent != null) {
            if (StringUtils.equalsIgnoreCase(resultingEvent.getId(), CasWebflowConstants.TRANSITION_ID_SUCCESS)) {
                try {
                    return super.doExecuteInternal(requestContext);
                } finally {
                    val ticket = resultingEvent.getAttributes().getRequired("result", TransientSessionTicket.class);
                    val credential = ticket.getProperty(Credential.class.getSimpleName(), Credential.class);
                    WebUtils.putCredential(requestContext, credential);
                }
            }
            return resultingEvent;
        }
        return processStateFromBrowserStorage(requestContext);
    }
This is {@link DuoSecurityUniversalPromptPrepareLoginAction}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-duo-core/src/main/java/org/apereo/cas/adaptors/duo/web/flow/action/DuoSecurityUniversalPromptValidateLoginAction.java