code: protected TransientSessionTicket retrieveSessionTicketViaClientId(final WebContext webContext, final String clientId) {
          val ticket = this.ticketRegistry.getTicket(clientId, TransientSessionTicket.class);
          if (ticket == null) {
              LOGGER.error("Delegated client identifier cannot be located in the authentication request [{}]", webContext.getFullRequestURL());
              throw new UnauthorizedServiceException(UnauthorizedServiceException.CODE_UNAUTHZ_SERVICE, StringUtils.EMPTY);
          }
          if (ticket.isExpired()) {
              LOGGER.error("Delegated client identifier [{}] has expired in the authentication request", ticket.getId());
              this.ticketRegistry.deleteTicket(ticket.getId());
              throw new UnauthorizedServiceException(UnauthorizedServiceException.CODE_UNAUTHZ_SERVICE, StringUtils.EMPTY);
          }
          LOGGER.debug("Located delegated client identifier as [{}]", ticket.getId());
          return ticket;
      }
docs: Retrieve session ticket via client id.
  
  @param webContext the web context
  @param clientId   the client id
  @return the transient session ticket