@GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)
    @Operation(summary = "Get current status of single sign-on", parameters = {
        @Parameter(name = "tgc", required = false, description = "The ticket-granting ticket cookie value"),
        @Parameter(name = "request", required = false, description = "The HTTP request")
    })
    public ResponseEntity<Map<?, ?>> ssoStatus(
        @RequestParam(name = "tgc", required = false, defaultValue = StringUtils.EMPTY) final String tgc,
        final HttpServletRequest request) {

        val ticketGrantingTicketCookieGenerator = ticketGrantingTicketCookieGeneratorProvider.getObject();
        val tgtId = StringUtils.isNotBlank(tgc)
            ? ticketGrantingTicketCookieGenerator.getCasCookieValueManager().obtainCookieValue(tgc, request)
            : ticketGrantingTicketCookieGenerator.retrieveCookieValue(request);
        if (StringUtils.isBlank(tgtId)) {
            return ResponseEntity.badRequest().build();
        }
        val ticketRegistrySupport = ticketRegistrySupportProvider.getObject();
        val auth = ticketRegistrySupport.getAuthenticationFrom(tgtId);
        if (auth == null) {
            return ResponseEntity.badRequest().build();
        }
        val ticketState = ticketRegistrySupport.getTicket(tgtId);
        val body = CollectionUtils.wrap("principal", auth.getPrincipal().getId(),
            "authenticationDate", auth.getAuthenticationDate(),
            "ticketGrantingTicketCreationTime", ticketState.getCreationTime(),
            "ticketGrantingTicketPreviousTimeUsed", ticketState.getPreviousTimeUsed(),
            "ticketGrantingTicketLastTimeUsed", ticketState.getLastTimeUsed());
        return ResponseEntity.ok(body);
    }
Sso status response entity.

@param tgc     the tgc
@param request the request
@return the response entity
support/cas-server-support-reports-core/src/main/java/org/apereo/cas/web/report/SingleSignOnSessionStatusEndpoint.java