protected static Optional<String> getTicketGrantingTicketId(final SingleSignOnParticipationRequest ssoRequest) {
        return Optional.ofNullable(ssoRequest.getRequestContext()
            .map(WebUtils::getTicketGrantingTicketId)
            .orElseGet(() -> ssoRequest.getAttributeValue(TicketGrantingTicket.class.getName(), String.class)));
    }
Gets ticket granting ticket id.

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