protected boolean shouldIssueTicketGrantingTicket(final Authentication authentication,
                                                      final String ticketGrantingTicket) throws Throwable {
        LOGGER.trace("Located ticket-granting ticket in the context. Retrieving associated authentication");
        val authenticationFromTgt = ticketRegistrySupport.getAuthenticationFrom(ticketGrantingTicket);

        if (authenticationFromTgt == null) {
            LOGGER.debug("Authentication session associated with [{}] is no longer valid", ticketGrantingTicket);
            if (StringUtils.isNotBlank(ticketGrantingTicket)) {
                removeTicketGrantingTicket(ticketGrantingTicket);
            }
            return true;
        }

        return isAuthenticationAttemptTheSame(authentication, authenticationFromTgt);
    }
This is {@link DefaultSingleSignOnBuildingStrategy}.

@author Misagh Moayyed
@since 7.1.0
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/DefaultSingleSignOnBuildingStrategy.java