@Override
    public Service retrieve(final RequestContext requestContext, final WebContext webContext, final Client client) {
        val clientId = getDelegatedClientId(webContext, client);
        val ticket = retrieveSessionTicketViaClientId(webContext, clientId);
        val service = restoreDelegatedAuthenticationRequest(requestContext, webContext, ticket, client);
        ticket.ifPresent(Unchecked.consumer(t -> {
            LOGGER.debug("Removing delegated client identifier [{}] from registry", t.getId());
            configContext.getTicketRegistry().deleteTicket(t.getId());
        }));
        return service;
    }
This is {@link DefaultDelegatedClientAuthenticationWebflowManager}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-pac4j-core/src/main/java/org/apereo/cas/web/flow/DefaultDelegatedClientAuthenticationWebflowManager.java