@Override
    protected AuthenticationHandlerExecutionResult doAuthentication(final Credential credential, final Service service) throws GeneralSecurityException {
        val tokenCredential = (QRAuthenticationTokenCredential) credential;
        try {
            LOGGER.debug("Received token [{}]", tokenCredential.getId());

            val request = QRAuthenticationTokenValidationRequest.builder()
                .token(tokenCredential.getId())
                .registeredService(Optional.empty())
                .deviceId(tokenCredential.getDeviceId())
                .build();

            val result = tokenValidatorService.validate(request);
            val principal = result.getAuthentication().getPrincipal();
            return createHandlerResult(tokenCredential, principal);
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
        }
        throw new FailedLoginException("Unable to verify QR code " + tokenCredential.getId());
    }
This is {@link QRAuthenticationTokenAuthenticationHandler}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-qr-authentication/src/main/java/org/apereo/cas/qr/authentication/QRAuthenticationTokenAuthenticationHandler.java