public static void putTicketGrantingTicketInScopes(final RequestContext context, final String ticketValue) {
        putTicketGrantingTicketIntoMap(context.getRequestScope(), ticketValue);
        putTicketGrantingTicketIntoMap(context.getFlowScope(), ticketValue);

        var session = context.getFlowExecutionContext().getActiveSession().getParent();
        while (session != null) {
            putTicketGrantingTicketIntoMap(session.getScope(), ticketValue);
            session = session.getParent();
        }
    }
Put ticket granting ticket in request and flow scopes.

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