code: @SneakyThrows
      protected SingleLogoutRequest createLogoutRequest(final String ticketId,
                                                        final WebApplicationService selectedService,
                                                        final RegisteredService registeredService,
                                                        final SingleLogoutUrl logoutUrl,
                                                        final TicketGrantingTicket ticketGrantingTicket) {
          val logoutRequest = DefaultSingleLogoutRequest.builder()
              .ticketId(ticketId)
              .service(selectedService)
              .logoutUrl(new URL(logoutUrl.getUrl()))
              .logoutType(logoutUrl.getLogoutType())
              .registeredService(registeredService)
              .ticketGrantingTicket(ticketGrantingTicket)
              .properties(logoutUrl.getProperties())
              .build();
  
          LOGGER.trace("Logout request [{}] created for [{}] and ticket id [{}]", logoutRequest, selectedService, ticketId);
  
          if (logoutRequest.getLogoutType() == RegisteredServiceLogoutType.BACK_CHANNEL) {
              if (performBackChannelLogout(logoutRequest)) {
                  logoutRequest.setStatus(LogoutRequestStatus.SUCCESS);
              } else {
                  logoutRequest.setStatus(LogoutRequestStatus.FAILURE);
                  LOGGER.warn("Logout message is not sent to [{}]; Continuing processing...", selectedService);
              }
          } else {
              LOGGER.trace("Logout operation is not yet attempted for [{}] given logout type is set to [{}]", selectedService, logoutRequest.getLogoutType());
              logoutRequest.setStatus(LogoutRequestStatus.NOT_ATTEMPTED);
          }
          return logoutRequest;
      }
docs: Create logout request logout request.
  
  @param ticketId             the ticket id
  @param selectedService      the selected service
  @param registeredService    the registered service
  @param logoutUrl            the logout url
  @param ticketGrantingTicket the ticket granting ticket
  @return the logout request