@Operation(summary = "Remove single sign-on session for type and user",
        parameters = {
            @Parameter(name = "type", in = ParameterIn.QUERY, description = "Type of sessions to retrieve (ALL, DIRECT, PROXIED)"),
            @Parameter(name = "username", in = ParameterIn.QUERY, description = "Username assigned to each session"),
            @Parameter(name = "from", schema = @Schema(type = "integer"), in = ParameterIn.QUERY, description = "Starting position/index of the query"),
            @Parameter(name = "count", schema = @Schema(type = "integer"), in = ParameterIn.QUERY, description = "Total number of sessions to return")
        })
    @DeleteMapping(produces = MediaType.APPLICATION_JSON_VALUE)
    public Map<String, Object> destroySsoSessions(
        final @Valid SsoSessionsRequest ssoSessionsRequest,
        final HttpServletRequest request,
        final HttpServletResponse response) {
        if (StringUtils.isBlank(ssoSessionsRequest.getUsername()) && StringUtils.isBlank(ssoSessionsRequest.getType())) {
            return Map.of(STATUS, HttpServletResponse.SC_BAD_REQUEST);
        }

        if (StringUtils.isNotBlank(ssoSessionsRequest.getUsername())) {
            val sessionsMap = new HashMap<String, Object>(1);
            var tickets = ticketRegistryProvider.getObject().getSessionsFor(ssoSessionsRequest.getUsername());
            if (ssoSessionsRequest.getFrom() > 0) {
                tickets = tickets.skip(ssoSessionsRequest.getFrom());
            }
            if (ssoSessionsRequest.getCount() > 0) {
                tickets = tickets.limit(ssoSessionsRequest.getCount());
            }
            tickets.forEach(ticket -> sessionsMap.put(ticket.getId(), destroySsoSession(ticket.getId(), request, response)));
            return sessionsMap;
        }

        val sessionsMap = new HashMap<String, Object>();
        getActiveSsoSessions(ssoSessionsRequest)
            .map(sso -> sso.get(SsoSessionAttributeKeys.TICKET_GRANTING_TICKET_ID.getAttributeKey()).toString())
            .forEach(ticketGrantingTicket -> destroySsoSession(ticketGrantingTicket, request, response));
        sessionsMap.put(STATUS, HttpServletResponse.SC_OK);
        return sessionsMap;
    }
Destroy sso sessions map.

@param ssoSessionsRequest the sso sessions request
@param request            the request
@param response           the response
@return the map
support/cas-server-support-reports-core/src/main/java/org/apereo/cas/web/report/SingleSignOnSessionsEndpoint.java