docs: @Override
      protected Event doExecute(final RequestContext context) {
          val service = WebUtils.getService(context);
          LOGGER.trace("Service asking for service ticket is [{}]", service);
  
          val ticketGrantingTicket = WebUtils.getTicketGrantingTicketId(context);
          LOGGER.debug("Ticket-granting ticket found in the context is [{}]", ticketGrantingTicket);
  
          try {
              val authentication = this.ticketRegistrySupport.getAuthenticationFrom(ticketGrantingTicket);
              if (authentication == null) {
                  val authn = new AuthenticationException("No authentication found for ticket " + ticketGrantingTicket);
                  throw new InvalidTicketException(authn, ticketGrantingTicket);
              }
  
              val selectedService = authenticationRequestServiceSelectionStrategies.resolveService(service);
              val registeredService = servicesManager.findServiceBy(selectedService);
              LOGGER.debug("Registered service asking for service ticket is [{}]", registeredService);
              WebUtils.putRegisteredService(context, registeredService);
              WebUtils.putServiceIntoFlowScope(context, service);
  
              if (registeredService != null) {
                  val url = registeredService.getAccessStrategy().getUnauthorizedRedirectUrl();
                  if (url != null) {
                      LOGGER.debug("Registered service may redirect to [{}] for unauthorized access requests", url);
                  }
                  WebUtils.putUnauthorizedRedirectUrlIntoFlowScope(context, url);
              }
              if (WebUtils.getWarningCookie(context)) {
                  LOGGER.debug("Warning cookie is present in the request context. Routing result to [{}] state", CasWebflowConstants.STATE_ID_WARN);
                  return result(CasWebflowConstants.STATE_ID_WARN);
              }
  
              val credential = WebUtils.getCredential(context);
              val builder = this.authenticationSystemSupport.establishAuthenticationContextFromInitial(authentication, credential);
              val authenticationResult = builder.build(principalElectionStrategy, service);
  
              LOGGER.trace("Built the final authentication result [{}] to grant service ticket to [{}]", authenticationResult, service);
              val serviceTicketId = this.centralAuthenticationService.grantServiceTicket(ticketGrantingTicket, service, authenticationResult);
              WebUtils.putServiceTicketInRequestScope(context, serviceTicketId);
              LOGGER.debug("Granted service ticket [{}] and added it to the request scope", serviceTicketId);
              return success();
  
          } catch (final AbstractTicketException e) {
              if (e instanceof InvalidTicketException) {
                  LOGGER.debug("CAS has determined ticket-granting ticket [{}] is invalid and must be destroyed", ticketGrantingTicket);
                  this.centralAuthenticationService.destroyTicketGrantingTicket(ticketGrantingTicket);
              }
              if (isGatewayPresent(context)) {
                  LOGGER.debug("Request indicates that it is gateway. Routing result to [{}] state", CasWebflowConstants.STATE_ID_GATEWAY);
                  return result(CasWebflowConstants.STATE_ID_GATEWAY);
              }
              LOGGER.warn("Could not grant service ticket [{}]. Routing to [{}]", e.getMessage(), CasWebflowConstants.TRANSITION_ID_AUTHENTICATION_FAILURE);
              return newEvent(CasWebflowConstants.TRANSITION_ID_AUTHENTICATION_FAILURE, e);
          }
      }