@GetMapping(ENDPOINT_QR_VERIFY + "/{ticketId}")
    @Operation(summary = "Start WebAuthn QR code authentication",
        parameters = @Parameter(name = "ticketId", in = ParameterIn.PATH, required = true, description = "Ticket id"))
    public ModelAndView startAuthentication(
        final HttpServletRequest request,
        final HttpServletResponse response,
        @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 context = SecurityContextUtils.createSecurityContext(transientTicket, request);
            securityContextRepository.saveContext(context, request, response);

            val principal = transientTicket.getProperty(Principal.class.getName(), Principal.class);
            return new ModelAndView(CasWebflowConstants.VIEW_ID_WEBAUTHN_QRCODE_VERIFY,
                Map.of("QRCodeTicket", transientTicket, "principal", principal, "QRCodeAuthentication", true));
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
            return new ModelAndView(CasWebflowConstants.VIEW_ID_WEBAUTHN_QRCODE_VERIFY_DONE, Map.of("success", false));
        }
    }
Start authentication model and view.

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