protected Optional<Ticket> getTicketState(final SingleSignOnParticipationRequest ssoRequest) {
        val tgtId = getTicketGrantingTicketId(ssoRequest).orElse(StringUtils.EMPTY);
        return Optional.ofNullable(ticketRegistrySupport.getTicket(tgtId));
    }
Gets ticket state.

@param ssoRequest the sso request
@return the ticket state
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/BaseSingleSignOnParticipationStrategy.java