public static void putTicketGrantingTicketIntoMap(final MutableAttributeMap<Object> map, final String ticketValue) {
        FunctionUtils.doIf(StringUtils.isNotBlank(ticketValue),
                value -> map.put(PARAMETER_TICKET_GRANTING_TICKET_ID, value),
                value -> map.remove(PARAMETER_TICKET_GRANTING_TICKET_ID))
            .accept(ticketValue);
    }
Put ticket granting ticket into map that is either backed by the flow/request scope.
Will override the previous value and blank out the setting if value is null or empty.

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