@MessageMapping("/accept")
    public boolean verify(final Message<String> message) {
        val payload = message.getPayload();
        LOGGER.trace("Received payload [{}]", payload);
        val nativeHeaders = Objects.requireNonNull(message.getHeaders().get("nativeHeaders", LinkedMultiValueMap.class));
        if (!nativeHeaders.containsKey(QRAuthenticationConstants.QR_AUTHENTICATION_CHANNEL_ID)) {
            LOGGER.warn("Unable to locate [{}] in the message header", QRAuthenticationConstants.QR_AUTHENTICATION_CHANNEL_ID);
            return false;
        }
        if (!nativeHeaders.containsKey(QRAuthenticationConstants.QR_AUTHENTICATION_DEVICE_ID)) {
            LOGGER.warn("Unable to locate [{}] in the message header", QRAuthenticationConstants.QR_AUTHENTICATION_DEVICE_ID);
            return false;
        }

        val channelId = Objects.requireNonNull(nativeHeaders.get(QRAuthenticationConstants.QR_AUTHENTICATION_CHANNEL_ID)).getFirst();
        val endpoint = String.format("%s/%s/verify", QRAuthenticationConstants.QR_SIMPLE_BROKER_DESTINATION_PREFIX, channelId);
        try {
            LOGGER.debug("Current channel id is [{}]", channelId);
            val resultMap = MAPPER.readValue(payload, new TypeReference<Map<String, String>>() {
            });
            val token = resultMap.get(TokenConstants.PARAMETER_NAME_TOKEN);

            val deviceId = Objects.requireNonNull(nativeHeaders.get(QRAuthenticationConstants.QR_AUTHENTICATION_DEVICE_ID)).getFirst().toString();
            val validationRequest = QRAuthenticationTokenValidationRequest.builder()
                .deviceId(deviceId)
                .token(token)
                .registeredService(Optional.empty())
                .build();

            tokenValidatorService.validate(validationRequest);
            LOGGER.debug("Current channel id is [{}]", channelId);
            val body = Map.of("success", Boolean.TRUE.toString(),
                TokenConstants.PARAMETER_NAME_TOKEN, token,
                "deviceId", deviceId);

            convertAndSend(endpoint, body);
            return true;
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
            convertAndSend(endpoint, Map.of("error", "cas.authn.qr.fail"));
        }
        return false;
    }
Verify.

@param message the message
@return true/false
support/cas-server-support-qr-authentication/src/main/java/org/apereo/cas/qr/web/QRAuthenticationChannelController.java