@Operation(summary = "Check QR ticket status",
        parameters = @Parameter(name = "ticketId", in = ParameterIn.PATH, required = true, description = "Ticket id"))
    @GetMapping(ENDPOINT_QR_VERIFY + "/{ticketId}/status")
    @ResponseBody
    public ResponseEntity checkQRTicketStatus(
        final HttpServletRequest request,
        @PathVariable("ticketId")
        final String ticketId) throws Throwable {
        try {
            verifyQRCodeAuthenticationIsEnabled();
            val transientTicket = ticketRegistry.getTicket(ticketId, TransientSessionTicket.class);
            Assert.isTrue(transientTicket != null && !transientTicket.isExpired(), "Ticket not found or has expired");
            val webAuthnCredential = transientTicket.getProperty(WebAuthnCredential.class.getName(), WebAuthnCredential.class);
            if (webAuthnCredential == null) {
                return ResponseEntity.unprocessableEntity().body(
                    Map.of("ticketId", ticketId, "message", "WebAuthn credential not found in the ticket"));
            }
            Assert.notNull(webAuthnCredential, "WebAuthn credential not found in the ticket");
            val principal = transientTicket.getProperty(Principal.class.getName(), Principal.class);

            val session = sessionManager.getSession(WebAuthnCredential.from(webAuthnCredential));
            Assert.isTrue(session.isPresent(), "Session is not found for the given credential");
            ticketRegistry.deleteTicket(ticketId);
            return ResponseEntity.ok(Map.of("principal", principal, "sessionToken", webAuthnCredential.getToken()));
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
            return ResponseEntity.badRequest().body(
                Map.of("ticketId", ticketId, "message", e.getMessage()));
        }
    }
Check qr ticket status.

@param request  the request
@param ticketId the ticket id
@return the response entity
@throws Throwable the throwable
support/cas-server-support-webauthn-core/src/main/java/org/apereo/cas/webauthn/web/WebAuthnQRCodeController.java