public static void putTicketGrantingTicketInScopes(final RequestContext context, final Ticket ticket) {
        putTicketGrantingTicket(context, ticket);
        val ticketValue = Optional.ofNullable(ticket).map(Ticket::getId).orElse(null);
        putTicketGrantingTicketInScopes(context, ticketValue);
    }
Put ticket granting ticket in request and flow scopes.

@param context the context
@param ticket  the ticket value
core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java