protected Set<Event> handleAuthenticationTransactionAndGrantTicketGrantingTicket(final RequestContext context) throws Throwable {
        val response = WebUtils.getHttpServletResponseFromExternalWebflowContext(context);
        try {
            val credentials = getCredentialFromContext(context);
            val builderResult = WebUtils.getAuthenticationResultBuilder(context);

            LOGGER.debug("Handling authentication transaction for credentials [{}]", credentials);
            val service = WebUtils.getService(context);
            val builder = configurationContext.getAuthenticationSystemSupport()
                .handleAuthenticationTransaction(service, builderResult, credentials.toArray(Credential.EMPTY_CREDENTIALS_ARRAY));

            LOGGER.debug("Issuing ticket-granting tickets for service [{}]", service);
            return CollectionUtils.wrapSet(grantTicketGrantingTicketToAuthenticationResult(context, builder, service));
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
            configurationContext.getCasWebflowExceptionCatalog().translateException(context, e);
            response.setStatus(HttpStatus.UNAUTHORIZED.value());
            return CollectionUtils.wrapSet(getAuthenticationFailureErrorEvent(context, e));
        }
    }
New event event.

@param id the id
@return the event
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/resolver/impl/AbstractCasWebflowEventResolver.java