protected Event processStateFromTicketRegistry(final RequestContext requestContext, final String duoState) throws Exception {
        if (duoState.startsWith(TransientSessionTicket.PREFIX)) {
            var ticket = (TransientSessionTicket) null;
            try {
                ticket = ticketRegistry.getTicket(duoState, TransientSessionTicket.class);
                if (ticket != null) {
                    val authentication = ticket.getProperty(Authentication.class.getSimpleName(), Authentication.class);
                    populateContextWithCredential(requestContext, ticket, authentication);
                    populateContextWithAuthentication(requestContext, ticket);
                    populateContextWithService(requestContext, ticket);
                    return success(ticket);
                }
            } catch (final Throwable e) {
                LoggingUtils.warn(LOGGER, e);
                return eventFactory.event(this, CasWebflowConstants.TRANSITION_ID_ERROR);
            } finally {
                if (ticket != null) {
                    val flowScope = ticket.getProperty(FlowScope.class.getSimpleName(), Map.class);
                    requestContext.getFlowScope().putAll(new LocalAttributeMap<>(flowScope));
                }
                ticketRegistry.deleteTicket(duoState);
            }
        }
        return null;
    }
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